Struct heapless::spsc::Consumer

source ·
pub struct Consumer<'a, T, N, U = usize, C = MultiCore>where
    N: ArrayLength<T>,
    U: Uxx,
    C: XCore,
{ /* private fields */ }
Expand description

A queue “consumer”; it can dequeue items from the queue

Implementations§

Returns if there are any items to dequeue. When this returns true, at least the first subsequent dequeue will succeed.

Returns the item in the front of the queue, or None if the queue is empty

Returns the item in the front of the queue, without checking if it’s empty

Unsafety

If the queue is empty this is equivalent to calling mem::uninitialized

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.