Struct freertos_rs::Queue
[−]
[src]
pub struct Queue<T: Sized + Copy> { /* fields omitted */ }
A queue with a finite size. The items are owned by the queue and are copied.
Methods
impl<T: Sized + Copy> Queue<T>
[src]
fn new(max_size: usize) -> Result<Queue<T>, FreeRtosError>
fn send(&self, item: T, max_wait: Duration) -> Result<(), FreeRtosError>
Send an item to the end of the queue. Wait for the queue to have empty space for it.
fn send_from_isr(
&self,
context: &mut InterruptContext,
item: T
) -> Result<(), FreeRtosError>
&self,
context: &mut InterruptContext,
item: T
) -> Result<(), FreeRtosError>
Send an item to the end of the queue, from an interrupt.
fn receive(&self, max_wait: Duration) -> Result<T, FreeRtosError>
Wait for an item to be available on the queue.