Struct heapless::CircularBuffer [] [src]

pub struct CircularBuffer<T, A> where
    A: AsMut<[T]> + AsRef<[T]>,
    T: Copy
{ /* fields omitted */ }

A circular buffer

Methods

impl<T, A> CircularBuffer<T, A> where
    A: AsMut<[T]> + AsRef<[T]>,
    T: Copy
[src]

Creates a new empty circular buffer using array as backup storage

Returns the capacity of this buffer

Pushes element into the buffer

This will overwrite an old value if the buffer is full

Trait Implementations

impl<T, A> Deref for CircularBuffer<T, A> where
    A: AsMut<[T]> + AsRef<[T]>,
    T: Copy
[src]

The resulting type after dereferencing

The method called to dereference a value