[][src]Struct freertos_rs::Queue

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]

pub fn new(max_size: usize) -> Result<Queue<T>, FreeRtosError>[src]

pub fn send<D: DurationTicks>(
    &self,
    item: T,
    max_wait: D
) -> Result<(), FreeRtosError>
[src]

Send an item to the end of the queue. Wait for the queue to have empty space for it.

pub fn send_from_isr(
    &self,
    context: &mut InterruptContext,
    item: T
) -> Result<(), FreeRtosError>
[src]

Send an item to the end of the queue, from an interrupt.

pub fn receive<D: DurationTicks>(&self, max_wait: D) -> Result<T, FreeRtosError>[src]

Wait for an item to be available on the queue.

Trait Implementations

impl<T: Sized + Copy> Send for Queue<T>[src]

impl<T: Sized + Copy> Sync for Queue<T>[src]

impl<T: Debug + Sized + Copy> Debug for Queue<T>[src]

impl<T: Sized + Copy> Drop for Queue<T>[src]

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]