Struct magnetic::spsc::SPSCConsumer
source · [−]pub struct SPSCConsumer<T, B: Buffer<T>> { /* private fields */ }
Expand description
Consumer end of the queue. Implements the trait Consumer<T>
.
Trait Implementations
sourceimpl<T, B: Buffer<T>> Consumer<T> for SPSCConsumer<T, B>
impl<T, B: Buffer<T>> Consumer<T> for SPSCConsumer<T, B>
sourcefn pop(&self) -> Result<T, PopError>
fn pop(&self) -> Result<T, PopError>
Remove value from the end of the queue. This method will block if the queue is currently empty. Read more
sourcefn try_pop(&self) -> Result<T, TryPopError>
fn try_pop(&self) -> Result<T, TryPopError>
Attempt to remove a value from the end of the queue. If the value was
removed successfully, Some(T)
will be returned. If unsuccessful,
None
will be returned. An unsuccessful pop indicates that the queue
was empty. Read more
sourceimpl<T, B: Buffer<T>> Drop for SPSCConsumer<T, B>
impl<T, B: Buffer<T>> Drop for SPSCConsumer<T, B>
impl<T: Send, B: Buffer<T>> Send for SPSCConsumer<T, B>
Auto Trait Implementations
impl<T, B> !RefUnwindSafe for SPSCConsumer<T, B>
impl<T, B> !Sync for SPSCConsumer<T, B>
impl<T, B> Unpin for SPSCConsumer<T, B>
impl<T, B> !UnwindSafe for SPSCConsumer<T, B>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more