Struct heapless::spsc::Consumer [−][src]
pub struct Consumer<'a, T, N, U = usize> where
N: ArrayLength<T>,
U: Uxx, { /* fields omitted */ }
A queue "consumer"; it can dequeue items from the queue
Methods
impl<'a, T, N> Consumer<'a, T, N, usize> where
N: ArrayLength<T>,
[src]
impl<'a, T, N> Consumer<'a, T, N, usize> where
N: ArrayLength<T>,
pub fn ready(&self) -> bool
[src]
pub fn ready(&self) -> bool
Returns if there are any items to dequeue. When this returns true, at least the first subsequent dequeue will succeed.
pub fn dequeue(&mut self) -> Option<T>
[src]
pub fn dequeue(&mut self) -> Option<T>
Returns the item in the front of the queue, or None
if the queue is empty
pub unsafe fn dequeue_unchecked(&mut self) -> T
[src]
pub unsafe fn dequeue_unchecked(&mut self) -> T
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
impl<'a, T, N, U> Send for Consumer<'a, T, N, U> where
N: ArrayLength<T>,
T: Send,
U: Uxx,
[src]
impl<'a, T, N, U> Send for Consumer<'a, T, N, U> where
N: ArrayLength<T>,
T: Send,
U: Uxx,