Struct microstack::Stack
source · pub struct Stack<V, const N: usize> { /* private fields */ }
Expand description
This is a simplest and the fastest implementation of a stack on stack.
For example, here is how a stack can be created:
use microstack::Stack;
let mut s : Stack<u64, 10> = Stack::new();
s.push(1);
s.push(2);
assert_eq!(2, *s.pop().unwrap());
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<V, const N: usize> RefUnwindSafe for Stack<V, N>where V: RefUnwindSafe,
impl<V, const N: usize> Send for Stack<V, N>where V: Send,
impl<V, const N: usize> Sync for Stack<V, N>where V: Sync,
impl<V, const N: usize> Unpin for Stack<V, N>where V: Unpin,
impl<V, const N: usize> UnwindSafe for Stack<V, N>where V: 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