pub struct BoundedStack<T> { /* private fields */ }Implementations§
Source§impl<T> BoundedStack<T>
impl<T> BoundedStack<T>
pub fn new(capacity: usize) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = &T>
pub fn iter_backwards(&self) -> impl Iterator<Item = &T>
pub fn push(&mut self, val: T) -> Result<(), StackError>
pub fn pop(&mut self) -> Option<T>
pub fn last(&self) -> Option<&T>
pub fn last_mut(&mut self) -> Option<&mut T>
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for BoundedStack<T>
impl<T> RefUnwindSafe for BoundedStack<T>where
T: RefUnwindSafe,
impl<T> Send for BoundedStack<T>where
T: Send,
impl<T> Sync for BoundedStack<T>where
T: Sync,
impl<T> Unpin for BoundedStack<T>
impl<T> UnwindSafe for BoundedStack<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