Type Alias sp_trie::trie_types::Lookup
source · pub type Lookup<'a, 'cache, H, Q> = Lookup<'a, 'cache, LayoutV1<H>, Q>;Expand description
Querying interface, as in trie_db but less generic.
Aliased Type§
struct Lookup<'a, 'cache, H, Q> {
pub db: &'a dyn HashDBRef<<LayoutV1<H> as TrieLayout>::Hash, Vec<u8>>,
pub query: Q,
pub hash: <<LayoutV1<H> as TrieLayout>::Hash as Hasher>::Out,
pub cache: Option<&'cache mut dyn TrieCache<<LayoutV1<H> as TrieLayout>::Codec>>,
pub recorder: Option<&'cache mut dyn TrieRecorder<<<LayoutV1<H> as TrieLayout>::Hash as Hasher>::Out>>,
}Fields§
§db: &'a dyn HashDBRef<<LayoutV1<H> as TrieLayout>::Hash, Vec<u8>>database to query from.
query: QQuery object to record nodes and transform data.
hash: <<LayoutV1<H> as TrieLayout>::Hash as Hasher>::OutHash to start at
cache: Option<&'cache mut dyn TrieCache<<LayoutV1<H> as TrieLayout>::Codec>>Optional cache that should be used to speed up the lookup.
recorder: Option<&'cache mut dyn TrieRecorder<<<LayoutV1<H> as TrieLayout>::Hash as Hasher>::Out>>Optional recorder that will be called to record all trie accesses.