pub struct Ring_buffer_type<T> { /* private fields */ }
Expand description
Lightweight ring buffer implementation.
Implementations§
Source§impl<T: Copy> Ring_buffer_type<T>
impl<T: Copy> Ring_buffer_type<T>
Sourcepub fn Get_capacity(&self) -> usize
pub fn Get_capacity(&self) -> usize
Get the capacity of the buffer.
Sourcepub fn Get_used_space(&self) -> usize
pub fn Get_used_space(&self) -> usize
Get the number of elements that are currently in the buffer.
Sourcepub fn Get_free_space(&self) -> usize
pub fn Get_free_space(&self) -> usize
Get the number of free elements in the buffer.
Auto Trait Implementations§
impl<T> Freeze for Ring_buffer_type<T>
impl<T> RefUnwindSafe for Ring_buffer_type<T>where
T: RefUnwindSafe,
impl<T> Send for Ring_buffer_type<T>where
T: Send,
impl<T> Sync for Ring_buffer_type<T>where
T: Sync,
impl<T> Unpin for Ring_buffer_type<T>where
T: Unpin,
impl<T> UnwindSafe for Ring_buffer_type<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