pub struct QueueLimits { /* private fields */ }Expand description
Limits on what a QueuedSender holds at once.
A frame counts from submission until the application takes it back, so a frame the SDK has finished with but that has not been collected still uses its share. The byte budget includes retained payload capacity, even when a compressed frame uses only part of a pooled vector. The defaults are 8 frames and 512 MiB. Construction reserves one stable frame descriptor per frame. Scatter frames own their scatter-list descriptors. Completed frames retain their slots until collected.
Implementations§
Source§impl QueueLimits
impl QueueLimits
Sourcepub fn configured_max_frames(&self) -> usize
pub fn configured_max_frames(&self) -> usize
Requested maximum frame count.
Sourcepub fn configured_max_bytes(&self) -> usize
pub fn configured_max_bytes(&self) -> usize
Requested maximum retained bytes.
Sourcepub fn max_frames(self, frames: usize) -> Self
pub fn max_frames(self, frames: usize) -> Self
Set the maximum number of frames held, from 1 to 65 536.
Sourcepub fn max_bytes(self, bytes: usize) -> Self
pub fn max_bytes(self, bytes: usize) -> Self
Set the maximum retained bytes of frame data and metadata, including
unused payload capacity reserved by pooled vectors. A frame larger
than this limit is refused with Error::InvalidInput; collecting
completions cannot make it fit.