Trait Layer2

Source
pub trait Layer2: Debug {
    type Descr: Layer2Descriptor<LoadError = Self::LoadError, StoreError = Self::StoreError>;
    type Data: Layer2Data<LoadError = Self::LoadError, StoreError = Self::StoreError>;
    type Cache: Layer2Cache<LoadError = Self::LoadError, StoreError = Self::StoreError>;
    type LoadError: Error;
    type StoreError: Error;

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

Required Associated Types§

Source

type Descr: Layer2Descriptor<LoadError = Self::LoadError, StoreError = Self::StoreError>

Source

type Data: Layer2Data<LoadError = Self::LoadError, StoreError = Self::StoreError>

Source

type Cache: Layer2Cache<LoadError = Self::LoadError, StoreError = Self::StoreError>

Source

type LoadError: Error

Source

type StoreError: Error

Required Methods§

Source

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

Source

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

Implementations on Foreign Types§

Source§

impl Layer2 for Option<ImpossibleLayer2>

Source§

type Descr = Option<ImpossibleLayer2>

Source§

type Data = Option<ImpossibleLayer2>

Source§

type Cache = Option<ImpossibleLayer2>

Source§

type LoadError = Infallible

Source§

type StoreError = Infallible

Source§

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

Source§

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

Implementors§