Struct weresocool_ring_buffer::RingBuffer
source · [−]Implementations
sourceimpl RingBuffer<f32>
impl RingBuffer<f32>
pub fn avg_frequency(&mut self) -> f32
sourceimpl<T: Sized + Copy + Clone + Default> RingBuffer<T>
impl<T: Sized + Copy + Clone + Default> RingBuffer<T>
pub fn new(capacity: usize) -> Self
pub fn new_full(capacity: usize) -> Self
pub fn push_vec(&mut self, values: Vec<T>)where
T: Clone + Copy,
pub fn push(&mut self, value: T)where
T: Clone + Copy,
pub fn current(&mut self) -> Twhere
T: Clone + Copy,
pub fn previous(&mut self) -> Twhere
T: Clone + Copy,
pub fn to_vec(&self) -> Vec<T>
Trait Implementations
sourceimpl<T: Clone + Copy + Clone + Sized> Clone for RingBuffer<T>
impl<T: Clone + Copy + Clone + Sized> Clone for RingBuffer<T>
sourcefn clone(&self) -> RingBuffer<T>
fn clone(&self) -> RingBuffer<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl<T> RefUnwindSafe for RingBuffer<T>where
T: RefUnwindSafe,
impl<T> Send for RingBuffer<T>where
T: Send,
impl<T> Sync for RingBuffer<T>where
T: Sync,
impl<T> Unpin for RingBuffer<T>where
T: Unpin,
impl<T> UnwindSafe for RingBuffer<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more