FastStack

Trait FastStack 

Source
pub trait FastStack<T: Copy + Default> {
    // Required methods
    fn push(&mut self, v: T);
    fn pop_fast(&mut self) -> T;
    fn pop(&mut self) -> Option<T>;
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;
    fn clear(&mut self);
}

Required Methods§

Source

fn push(&mut self, v: T)

Source

fn pop_fast(&mut self) -> T

Source

fn pop(&mut self) -> Option<T>

Source

fn len(&self) -> usize

Source

fn is_empty(&self) -> bool

Source

fn clear(&mut self)

Implementations on Foreign Types§

Source§

impl<T: Copy + Default> FastStack<T> for Vec<T>

Source§

fn push(&mut self, v: T)

Source§

fn pop_fast(&mut self) -> T

Source§

fn pop(&mut self) -> Option<T>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn clear(&mut self)

Implementors§

Source§

impl<T: Copy + Default> FastStack<T> for HeapStack<T>

Source§

impl<T: Copy + Default, const STACK_SIZE: usize> FastStack<T> for StackStack<T, STACK_SIZE>