pub struct Producer<'a, T, const N: usize> { /* private fields */ }
Expand description

A queue “producer”; it can enqueue items into the queue NOTE the producer semantically owns the tail pointer of the queue

Implementations

Adds an item to the end of the queue, returns back the item if the queue is full

Adds an item to the end of the queue, without checking if the queue is full

See Queue::enqueue_unchecked for safety

Returns if there is any space to enqueue a new item. When this returns true, at least the first subsequent enqueue will succeed.

Returns the number of elements in the queue

Returns the maximum number of elements the queue can hold

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.

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.