Trait History

Source
pub trait History {
    type State;
    type Error: Error;

    // Required methods
    fn height(&self) -> usize;
    fn get(&self, height: usize) -> Result<Self::State, Self::Error>;
    fn top(&self) -> Result<Self::State, Self::Error>;
    fn bottom(&self) -> Result<Self::State, Self::Error>;
    fn dig(&self) -> Result<Self::State, Self::Error>;
    fn push(&mut self, state: Self::State) -> Result<&mut Self, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn height(&self) -> usize

Source

fn get(&self, height: usize) -> Result<Self::State, Self::Error>

Source

fn top(&self) -> Result<Self::State, Self::Error>

Source

fn bottom(&self) -> Result<Self::State, Self::Error>

Source

fn dig(&self) -> Result<Self::State, Self::Error>

Source

fn push(&mut self, state: Self::State) -> Result<&mut Self, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§