pub trait TrieBackendStorage<H: Hasher>: Send + Sync {
    type Overlay: HashDB<H, DBValue> + Default + Consolidate;

    // Required method
    fn get(
        &self,
        key: &H::Out,
        prefix: Prefix<'_>
    ) -> Result<Option<DBValue>, DefaultError>;
}
Expand description

Key-value pairs storage that is used by trie backend essence.

Required Associated Types§

source

type Overlay: HashDB<H, DBValue> + Default + Consolidate

Type of in-memory overlay.

Required Methods§

source

fn get( &self, key: &H::Out, prefix: Prefix<'_> ) -> Result<Option<DBValue>, DefaultError>

Get the value stored at key.

Implementations on Foreign Types§

source§

impl<H, KF> TrieBackendStorage<H> for GenericMemoryDB<H, KF>where H: Hasher, KF: KeyFunction<H> + Send + Sync,

§

type Overlay = MemoryDB<H, KF, Vec<u8, Global>>

source§

fn get( &self, key: &H::Out, prefix: Prefix<'_> ) -> Result<Option<DBValue>, DefaultError>

source§

impl<T: TrieBackendStorage<H>, H: Hasher> TrieBackendStorage<H> for &T

§

type Overlay = <T as TrieBackendStorage<H>>::Overlay

source§

fn get( &self, key: &H::Out, prefix: Prefix<'_> ) -> Result<Option<DBValue>, DefaultError>

source§

impl<H: Hasher> TrieBackendStorage<H> for Arc<dyn Storage<H>>

§

type Overlay = MemoryDB<H, PrefixedKey<H>, Vec<u8, Global>>

source§

fn get( &self, key: &H::Out, prefix: Prefix<'_> ) -> Result<Option<DBValue>, DefaultError>

Implementors§