Trait Storage

Source
pub trait Storage<T: 'static>: 'static {
    // Required methods
    fn is_full(&self) -> bool;
    fn is_empty(&self) -> bool;
    fn push(&mut self, t: T) -> Result<(), StorageFull>;
    fn try_pop(&mut self) -> Option<T>;
}

Required Methods§

Source

fn is_full(&self) -> bool

Source

fn is_empty(&self) -> bool

Source

fn push(&mut self, t: T) -> Result<(), StorageFull>

Source

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

Implementations on Foreign Types§

Source§

impl<T: 'static> Storage<T> for Option<T>

Source§

fn is_full(&self) -> bool

Source§

fn is_empty(&self) -> bool

Source§

fn push(&mut self, t: T) -> Result<(), StorageFull>

Source§

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

Implementors§

Source§

impl<T: 'static> Storage<T> for ergot_base::socket::std_bounded::Bounded<T>

Source§

impl<T: 'static, const N: usize> Storage<T> for ergot_base::socket::stack_vec::Bounded<T, N>