pub struct PushBuffer<T> { /* private fields */ }Expand description
https://github.com/stjepangolemac/ringvec
Implementations§
Source§impl<T> PushBuffer<T>
impl<T> PushBuffer<T>
pub fn new(buffer_type: BufferType, capacity: usize) -> Self
pub fn capacity(&self) -> usize
pub fn size(&self) -> usize
pub fn to_string(&self) -> String
pub fn copy(&self, i: usize) -> Option<T>
pub fn copy_oldest(&self) -> Option<T>
pub fn flush(&mut self)
pub fn get(&self, i: usize) -> Option<&T>
pub fn get_mut(&mut self, i: usize) -> Option<&mut T>
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn push(&mut self, element: T)
pub fn push_force(&mut self, element: T)
pub fn pop(&mut self) -> Option<T>
pub fn peek_oldest(&self) -> Option<&T>
pub fn peek_newest(&self) -> Option<&T>
pub fn iter(&self) -> PushBufferIterator<'_, T> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for PushBuffer<T>
impl<T> RefUnwindSafe for PushBuffer<T>where
T: RefUnwindSafe,
impl<T> Send for PushBuffer<T>where
T: Send,
impl<T> Sync for PushBuffer<T>where
T: Sync,
impl<T> Unpin for PushBuffer<T>where
T: Unpin,
impl<T> UnwindSafe for PushBuffer<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more