Struct heapless::spsc::Producer [−][src]
pub struct Producer<'a, T, const N: usize> { /* fields omitted */ }
Expand description
A queue “producer”; it can enqueue items into the queue
NOTE the producer semantically owns the tail
pointer of the queue
Implementations
impl<'a, T, const N: usize> Producer<'a, T, N>
[src]
impl<'a, T, const N: usize> Producer<'a, T, N>
[src]pub fn enqueue(&mut self, val: T) -> Result<(), T>
[src]
pub fn enqueue(&mut self, val: T) -> Result<(), T>
[src]Adds an item
to the end of the queue, returns back the item
if the queue is full
pub unsafe fn enqueue_unchecked(&mut self, val: T)
[src]
pub unsafe fn enqueue_unchecked(&mut self, val: T)
[src]Adds an item
to the end of the queue, without checking if the queue is full
See Queue::enqueue_unchecked
for safety