Trait oasis_core_runtime::storage::mkvs::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§