pub trait ChangesTrieStorage<H: Hasher, Number: BlockNumber>: RootsStorage<H, Number> {
// Required methods
fn as_roots_storage(&self) -> &dyn RootsStorage<H, Number>;
fn with_cached_changed_keys(
&self,
root: &H::Out,
functor: &mut dyn FnMut(&HashMap<Option<PrefixedStorageKey>, HashSet<StorageKey>>),
) -> bool;
fn get(
&self,
key: &H::Out,
prefix: Prefix<'_>,
) -> Result<Option<DBValue>, String>;
}Expand description
Changes trie storage. Provides access to trie roots and trie nodes.
Required Methods§
Sourcefn as_roots_storage(&self) -> &dyn RootsStorage<H, Number>
fn as_roots_storage(&self) -> &dyn RootsStorage<H, Number>
Casts from self reference to RootsStorage reference.
Sourcefn with_cached_changed_keys(
&self,
root: &H::Out,
functor: &mut dyn FnMut(&HashMap<Option<PrefixedStorageKey>, HashSet<StorageKey>>),
) -> bool
fn with_cached_changed_keys( &self, root: &H::Out, functor: &mut dyn FnMut(&HashMap<Option<PrefixedStorageKey>, HashSet<StorageKey>>), ) -> bool
Execute given functor with cached entry for given trie root. Returns true if the functor has been called (cache entry exists) and false otherwise.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".