pub trait RingBuffer<T> {
    fn current(&self) -> &T;
    fn current_mut(&mut self) -> &mut T;
    fn next(&mut self);
    fn current_index(&self) -> usize;
}
Expand description

General trait for ring buffers.

Required Methods§

Get a borrow the current item.

Get a mutable borrow to the current item.

Move to the next item in the ring buffer.

Implementors§