pub struct MpmcConsumer { /* private fields */ }Expand description
One consumer handle. Sole drainer of a subset of producer rings (round-robin assignment from the factory).
Implementations§
Source§impl MpmcConsumer
impl MpmcConsumer
Sourcepub fn try_pop(&self, out: &mut [u8]) -> Result<usize, RingError>
pub fn try_pop(&self, out: &mut [u8]) -> Result<usize, RingError>
Drain one item from this consumer’s assigned subset of
producer rings, round-robin. Returns Ok on the first
non-empty ring; Err(Empty) only if every ring in the
subset is empty.
Sourcepub fn approx_subset_len(&self) -> usize
pub fn approx_subset_len(&self) -> usize
Approximate total items waiting across this consumer’s subset.
Auto Trait Implementations§
impl !Freeze for MpmcConsumer
impl !RefUnwindSafe for MpmcConsumer
impl !Sync for MpmcConsumer
impl !UnwindSafe for MpmcConsumer
impl Send for MpmcConsumer
impl Unpin for MpmcConsumer
impl UnsafeUnpin for MpmcConsumer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more