pub struct BlockingUnboundedSpscConsumer<T, const P: usize, const NUM_SEGS_P2: usize> { /* private fields */ }Expand description
Blocking consumer for unbounded SPSC queue.
Implementations§
Source§impl<T, const P: usize, const NUM_SEGS_P2: usize> BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
Sourcepub fn recv(&self) -> Result<T, PopError>
pub fn recv(&self) -> Result<T, PopError>
Blocking receive that parks the thread until an item is available.
Sourcepub fn recv_batch(&self, dst: &mut [T]) -> Result<usize, PopError>where
T: Clone,
pub fn recv_batch(&self, dst: &mut [T]) -> Result<usize, PopError>where
T: Clone,
Blocking receive of multiple items.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the number of nodes in the unbounded queue.
Sourcepub fn total_capacity(&self) -> usize
pub fn total_capacity(&self) -> usize
Returns the total capacity across all nodes.
Auto Trait Implementations§
impl<T, const P: usize, const NUM_SEGS_P2: usize> Freeze for BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> !RefUnwindSafe for BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> Send for BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> Sync for BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> Unpin for BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> !UnwindSafe for BlockingUnboundedSpscConsumer<T, P, NUM_SEGS_P2>
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