Struct fixed_circular_buffer::CircularBuffer
[−]
[src]
pub struct CircularBuffer<T> {
// some fields omitted
}Must not be empty
Methods
impl<T> CircularBuffer<T>[src]
fn len(&self) -> usize
fn queue(&mut self, elem: T) -> T
fn set_first(&mut self, index: usize)
fn get(&self, index: usize) -> &T
fn get_mut(&mut self, index: usize) -> &mut T
fn swap_internal(&mut self, a: usize, b: usize)
fn swap(&mut self, index: usize, elem: T) -> T
unsafe fn from_raw_parts(list: Box<[T]>, first: usize) -> Self
fn into_raw_parts(self) -> (Box<[T]>, usize)
Trait Implementations
impl<T: Hash> Hash for CircularBuffer<T>[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl<T: PartialEq> PartialEq for CircularBuffer<T>[src]
fn eq(&self, __arg_0: &CircularBuffer<T>) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &CircularBuffer<T>) -> bool
This method tests for !=.
impl<T: Eq> Eq for CircularBuffer<T>[src]
impl<T: Clone> Clone for CircularBuffer<T>[src]
fn clone(&self) -> CircularBuffer<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl<T> From<Vec<T>> for CircularBuffer<T>[src]
impl<T> From<Box<[T]>> for CircularBuffer<T>[src]
impl<T> FromIterator<T> for CircularBuffer<T>[src]
fn from_iter<I>(i: I) -> Self where I: IntoIterator<Item=T>
Creates a value from an iterator. Read more