Struct heapless::ring_buffer::RingBuffer [] [src]

pub struct RingBuffer<T, A> where
    A: Unsize<[T]>, 
{ /* fields omitted */ }

An statically allocated ring buffer backed by an array A

Methods

impl<T, A> RingBuffer<T, A> where
    A: Unsize<[T]>, 
[src]

[src]

Splits a statically allocated ring buffer into producer and consumer end points

impl<T, A> RingBuffer<T, A> where
    A: Unsize<[T]>, 
[src]

[src]

Creates an empty ring buffer with capacity equals to the length of the array A minus one.

[src]

Returns the maximum number of elements the ring buffer can hold

[src]

Returns the item in the front of the queue, or None if the queue is empty

[src]

Adds an item to the end of the queue

Returns BufferFullError if the queue is full

[src]

Returns the number of elements in the queue

[src]

Returns true if the ring buffer has a length of 0

Important traits for Iter<'a, T, A>
[src]

Iterates from the front of the queue to the back

Important traits for IterMut<'a, T, A>
[src]

Returns an iterator that allows modifying each value.

Trait Implementations

impl<T, A> Drop for RingBuffer<T, A> where
    A: Unsize<[T]>, 
[src]

[src]

Executes the destructor for this type. Read more

impl<'a, T, A> IntoIterator for &'a RingBuffer<T, A> where
    A: Unsize<[T]>, 
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a, T, A> IntoIterator for &'a mut RingBuffer<T, A> where
    A: Unsize<[T]>, 
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

Auto Trait Implementations

impl<T, A> Send for RingBuffer<T, A> where
    A: Send,
    T: Send

impl<T, A> !Sync for RingBuffer<T, A>