Trait DatabaseHeight

Source
pub trait DatabaseHeight:
    PartialEq
    + Default
    + Debug
    + Copy
    + Send
    + Sync {
    // Required methods
    fn as_u64(&self) -> u64;
    fn advance_height(&self) -> Option<Self>;
    fn rollback_height(&self) -> Option<Self>;
}

Required Methods§

Source

fn as_u64(&self) -> u64

Source

fn advance_height(&self) -> Option<Self>

Source

fn rollback_height(&self) -> Option<Self>

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.

Implementations on Foreign Types§

Source§

impl DatabaseHeight for DaBlockHeight

Source§

fn as_u64(&self) -> u64

Source§

fn advance_height(&self) -> Option<Self>

Source§

fn rollback_height(&self) -> Option<Self>

Source§

impl DatabaseHeight for BlockHeight

Source§

fn as_u64(&self) -> u64

Source§

fn advance_height(&self) -> Option<Self>

Source§

fn rollback_height(&self) -> Option<Self>

Implementors§