CachePaddedSPMCConsumer

Struct CachePaddedSPMCConsumer 

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

The consumer of the SPMCBoundedQueue.

Trait Implementations§

Source§

impl<T: Send, const CAPACITY: usize> Clone for CachePaddedSPMCConsumer<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 CachePaddedSPMCConsumer<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 CachePaddedSPMCConsumer<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> MultiConsumer<T> for CachePaddedSPMCConsumer<T, CAPACITY>

Source§

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

Source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

impl<T, const CAPACITY: usize> !UnwindSafe for CachePaddedSPMCConsumer<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.