Trait ImmutableMKVS

Source
pub trait ImmutableMKVS {
    // Required methods
    fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>;
    fn get_proof(&self, key: &[u8]) -> Result<Option<Proof>>;
    fn prefetch_prefixes(&self, prefixes: &[Prefix], limit: u16) -> Result<()>;
    fn iter(&self) -> Box<dyn Iterator + '_>;
}
Expand description

Immutable merkalized key value store.

Required Methods§

Source

fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>

Fetch entry with given key.

Source

fn get_proof(&self, key: &[u8]) -> Result<Option<Proof>>

Fetch proof for entry with given key.

Source

fn prefetch_prefixes(&self, prefixes: &[Prefix], limit: u16) -> Result<()>

Populate the in-memory tree with nodes for keys starting with given prefixes.

Source

fn iter(&self) -> Box<dyn Iterator + '_>

Returns an iterator over the tree.

Implementors§