Trait strider::SliceRing
[−]
[src]
pub trait SliceRing<T> {
fn push_many_back(&mut self, values: &[T]);
fn drop_many_front(&mut self, count: usize) -> usize;
fn read_many_front(&self, output: &mut [T]) -> usize;
}ringbuffer operations on slices
Required Methods
fn push_many_back(&mut self, values: &[T])
appends values to the back of this ring.
fn drop_many_front(&mut self, count: usize) -> usize
removes count elements from the front of this ring.
returns how many elements were removed.
returns less than count if less elements are present
in this ring.
fn read_many_front(&self, output: &mut [T]) -> usize
copies the first output.len() elements present in this ring
into output.
returns how many elements were copied.
returns less than output.len() if there are less elements present
in this ring.