pub trait RingBuffer<T> {
// Required methods
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§
Sourcefn current_mut(&mut self) -> &mut T
fn current_mut(&mut self) -> &mut T
Get a mutable borrow to the current item.