pub struct MpscFifoConsumer { /* private fields */ }Expand description
The single consumer handle. Uses the consumer-side SPSC fast
path on the shared Vyukov ring; !Sync + !Clone + Send.
Implementations§
Source§impl MpscFifoConsumer
impl MpscFifoConsumer
Sourcepub fn try_pop(&self, out: &mut [u8]) -> Result<usize, RingError>
pub fn try_pop(&self, out: &mut [u8]) -> Result<usize, RingError>
Pop one payload using the single-consumer fast path on the
shared Vyukov ring. Skips the consumer-side CAS that the
MPMC try_pop needs to defend against racing consumers.
Sound here because the !Sync + !Clone type contract
guarantees this is the only consumer.
Auto Trait Implementations§
impl !RefUnwindSafe for MpscFifoConsumer
impl !Sync for MpscFifoConsumer
impl !UnwindSafe for MpscFifoConsumer
impl Freeze for MpscFifoConsumer
impl Send for MpscFifoConsumer
impl Unpin for MpscFifoConsumer
impl UnsafeUnpin for MpscFifoConsumer
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