CachePaddedMPMCConsumer

Struct CachePaddedMPMCConsumer 

Source
pub struct CachePaddedMPMCConsumer<T: Send, const CAPACITY: usize> { /* private fields */ }
Expand description

The consumer of the MPMCBoundedQueue.

Implementations§

Source§

impl<T: Send, const CAPACITY: usize> CachePaddedMPMCConsumer<T, CAPACITY>

Source

pub fn queue(&self) -> &MPMCBoundedQueue<T, CAPACITY, CachePaddedLongAtomic>

Returns a reference to the inner MPMCBoundedQueue.

Trait Implementations§

Source§

impl<T: Send, const CAPACITY: usize> Clone for CachePaddedMPMCConsumer<T, CAPACITY>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Send, const CAPACITY: usize> Consumer<T> for CachePaddedMPMCConsumer<T, CAPACITY>

Source§

fn capacity(&self) -> usize

Returns the capacity of the queue.
Source§

fn len(&self) -> usize

Returns the length of the queue.
Source§

fn pop_many(&self, dst: &mut [MaybeUninit<T>]) -> usize

Pops many values from the queue and returns the number of read values. Read more
Source§

fn steal_into(&self, dst: &impl SingleProducer<T>) -> usize

Steals some values from the consumer and places them into dst. Returns the number of stolen values. Read more
Source§

fn is_empty(&self) -> bool

Returns whether the queue is empty.
Source§

fn pop(&self) -> Option<T>

Pops a value from the queue and returns it. Read more
Source§

impl<T: Send, const CAPACITY: usize> LockFreeConsumer<T> for CachePaddedMPMCConsumer<T, CAPACITY>

Source§

fn lock_free_pop_many(&self, dst: &mut [MaybeUninit<T>]) -> (usize, bool)

Pops many values from the queue. Returns the number of popped values and whether the operation failed because it should wait. Read more
Source§

fn lock_free_steal_into( &self, dst: &impl SingleLockFreeProducer<T>, ) -> (usize, bool)

Steals some values from the consumer and places them into dst. Returns the number of stolen values and whether the operation failed because it should wait. Read more
Source§

fn lock_free_pop(&self) -> Result<T, LockFreePopErr>

Pops a value from the queue. On failure, returns Err(LockFreePopErr). Read more
Source§

impl<T: Send, const CAPACITY: usize> MultiLockFreeProducerSpawner<T> for CachePaddedMPMCConsumer<T, CAPACITY>

Source§

impl<T: Send, const CAPACITY: usize> MultiProducerSpawner<T> for CachePaddedMPMCConsumer<T, CAPACITY>

Source§

impl<T: Send, const CAPACITY: usize> MultiConsumer<T> for CachePaddedMPMCConsumer<T, CAPACITY>

Source§

impl<T: Send, const CAPACITY: usize> MultiLockFreeConsumer<T> for CachePaddedMPMCConsumer<T, CAPACITY>

Source§

impl<T: Send, const CAPACITY: usize> Send for CachePaddedMPMCConsumer<T, CAPACITY>

Auto Trait Implementations§

§

impl<T, const CAPACITY: usize> Freeze for CachePaddedMPMCConsumer<T, CAPACITY>

§

impl<T, const CAPACITY: usize> !RefUnwindSafe for CachePaddedMPMCConsumer<T, CAPACITY>

§

impl<T, const CAPACITY: usize> !Sync for CachePaddedMPMCConsumer<T, CAPACITY>

§

impl<T, const CAPACITY: usize> Unpin for CachePaddedMPMCConsumer<T, CAPACITY>

§

impl<T, const CAPACITY: usize> !UnwindSafe for CachePaddedMPMCConsumer<T, CAPACITY>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.