Trait oasis_runtime_sdk::storage::Store
source · pub trait Store {
// Required methods
fn get(&self, key: &[u8]) -> Option<Vec<u8>>;
fn insert(&mut self, key: &[u8], value: &[u8]);
fn remove(&mut self, key: &[u8]);
fn iter(&self) -> Box<dyn Iterator + '_>;
fn prefetch_prefixes(&mut self, prefixes: Vec<Prefix>, limit: u16);
}
Expand description
A key-value store.
Required Methods§
sourcefn prefetch_prefixes(&mut self, prefixes: Vec<Prefix>, limit: u16)
fn prefetch_prefixes(&mut self, prefixes: Vec<Prefix>, limit: u16)
Populate the in-memory tree with nodes for keys starting with given prefixes.