Trait Layer2Cache

Source
pub trait Layer2Cache: Debug + Default {
    type LoadError: Error;
    type StoreError: Error;
    type Tx: Layer2Tx;
    type Coin: Layer2Coin;

    // Required methods
    fn load(path: &Path) -> Result<Self, Self::LoadError>
       where Self: Sized;
    fn store(&self, path: &Path) -> Result<(), Self::StoreError>;
}

Required Associated Types§

Required Methods§

Source

fn load(path: &Path) -> Result<Self, Self::LoadError>
where Self: Sized,

Source

fn store(&self, path: &Path) -> Result<(), Self::StoreError>

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 Layer2Cache for Option<ImpossibleLayer2>

Source§

type Tx = Option<ImpossibleLayer2>

Source§

type Coin = Option<ImpossibleLayer2>

Source§

type LoadError = Infallible

Source§

type StoreError = Infallible

Source§

fn load( _: &Path, ) -> Result<Option<ImpossibleLayer2>, <Option<ImpossibleLayer2> as Layer2Cache>::LoadError>

Source§

fn store( &self, _: &Path, ) -> Result<(), <Option<ImpossibleLayer2> as Layer2Cache>::StoreError>

Implementors§