pub struct RingBuf<T: Copy + Default, const N: usize> { /* private fields */ }Expand description
A ring buffer of N elements stored entirely on the stack.
Once full, new pushes overwrite the oldest entry. Iteration with
iter() yields elements from oldest to newest.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize> Freeze for RingBuf<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for RingBuf<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for RingBuf<T, N>where
T: Send,
impl<T, const N: usize> Sync for RingBuf<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for RingBuf<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for RingBuf<T, N>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