Consumer

Struct Consumer 

Source
pub struct Consumer<'a, T, Q: HasPoolIdx<N>, const N: usize, const M: usize> {
    pub alloc_cons: Consumer<'a, Q, M>,
    pub return_prod: Producer<'a, Q, M>,
    /* private fields */
}

Fields§

§alloc_cons: Consumer<'a, Q, M>§return_prod: Producer<'a, Q, M>

Implementations§

Source§

impl<'a, T, Q: HasPoolIdx<N>, const N: usize, const M: usize> Consumer<'a, T, Q, N, M>

Source

pub fn peek_with_payload(&self) -> (Option<&Q>, Option<&SharedSingleton<T>>)

Source

pub fn peek(&self) -> Option<&Q>

Source

pub fn read_pool_item(&self, pidx: PoolIndex<N>) -> Option<&SharedSingleton<T>>

Source

pub fn pop(&mut self) -> Result<(), SharedPoolError>

Source

pub fn return_payload( &mut self, pidx: PoolIndex<N>, ) -> Result<(), SharedPoolError>

Auto Trait Implementations§

§

impl<'a, T, Q, const N: usize, const M: usize> Freeze for Consumer<'a, T, Q, N, M>

§

impl<'a, T, Q, const N: usize, const M: usize> !RefUnwindSafe for Consumer<'a, T, Q, N, M>

§

impl<'a, T, Q, const N: usize, const M: usize> Send for Consumer<'a, T, Q, N, M>

§

impl<'a, T, Q, const N: usize, const M: usize> Sync for Consumer<'a, T, Q, N, M>

§

impl<'a, T, Q, const N: usize, const M: usize> Unpin for Consumer<'a, T, Q, N, M>

§

impl<'a, T, Q, const N: usize, const M: usize> !UnwindSafe for Consumer<'a, T, Q, N, M>

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> 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, 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.