TrieBackendStorage

Trait TrieBackendStorage 

Source
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: Hasher> TrieBackendStorage<H> for Arc<dyn Storage<H>>

Source§

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

Source§

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

Source§

impl<H: Hasher> TrieBackendStorage<H> for PrefixedMemoryDB<H>

Source§

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

Source§

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

Implementors§