pub struct RingStack<T, const N: usize> { /* private fields */ }
Implementations§
Source§impl<T, const N: usize> RingStack<T, N>
impl<T, const N: usize> RingStack<T, N>
pub fn new() -> Self
pub fn push(&mut self, val: T)
pub fn pop(&mut self) -> Option<T>
pub fn peek(&self) -> Option<&T>
pub fn len(&self) -> usize
pub fn get(&self, index: usize) -> Option<&T>
pub fn iter(&self) -> impl Iterator<Item = &T>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T>
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize> Freeze for RingStack<T, N>
impl<T, const N: usize> RefUnwindSafe for RingStack<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for RingStack<T, N>where
T: Send,
impl<T, const N: usize> Sync for RingStack<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for RingStack<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for RingStack<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