Struct heapless::ring_buffer::Producer[][src]

pub struct Producer<'a, T, N, U = usize> where
    N: Add<U1> + Unsigned,
    Sum<N, U1>: ArrayLength<T>,
    U: Uxx
{ /* fields omitted */ }

A ring buffer "producer"; it can enqueue items into the ring buffer

Methods

impl<'a, T, N> Producer<'a, T, N, u8> where
    N: Add<U1> + Unsigned,
    Sum<N, U1>: ArrayLength<T>, 
[src]

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

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 it's full

WARNING If the queue is full this operation will make the queue appear empty to the Consumer, thus leaking (destructors won't run) all the elements that were in the queue.

impl<'a, T, N> Producer<'a, T, N, u16> where
    N: Add<U1> + Unsigned,
    Sum<N, U1>: ArrayLength<T>, 
[src]

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

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 it's full

WARNING If the queue is full this operation will make the queue appear empty to the Consumer, thus leaking (destructors won't run) all the elements that were in the queue.

impl<'a, T, N> Producer<'a, T, N, usize> where
    N: Add<U1> + Unsigned,
    Sum<N, U1>: ArrayLength<T>, 
[src]

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

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 it's full

WARNING If the queue is full this operation will make the queue appear empty to the Consumer, thus leaking (destructors won't run) all the elements that were in the queue.

Trait Implementations

impl<'a, T, N, U> Send for Producer<'a, T, N, U> where
    N: Add<U1> + Unsigned,
    Sum<N, U1>: ArrayLength<T>,
    T: Send,
    U: Uxx
[src]

Auto Trait Implementations

impl<'a, T, N, U = usize> !Sync for Producer<'a, T, N, U>