Struct trie_db::FatDBMut [−][src]
pub struct FatDBMut<'db, L> where
L: TrieLayout, { /* fields omitted */ }Expand description
A mutable Trie implementation which hashes keys and uses a generic HashDB backing database.
Additionaly it stores inserted hash-key mappings for later retrieval.
Use it as a Trie or TrieMut trait object.
Implementations
impl<'db, L> FatDBMut<'db, L> where
L: TrieLayout, [src]
impl<'db, L> FatDBMut<'db, L> where
L: TrieLayout, [src]pub fn new(
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Self[src]
pub fn new(
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Self[src]Create a new trie with the backing database db and empty root
Initialise to the state entailed by the genesis block.
This guarantees the trie is built correctly.
Trait Implementations
impl<'db, L> TrieMut<L> for FatDBMut<'db, L> where
L: TrieLayout, [src]
impl<'db, L> TrieMut<L> for FatDBMut<'db, L> where
L: TrieLayout, [src]fn contains(&self, key: &[u8]) -> Result<bool, TrieHash<L>, CError<L>>[src]
fn contains(&self, key: &[u8]) -> Result<bool, TrieHash<L>, CError<L>>[src]Does the trie contain a given key?
fn get<'a, 'key>(
&'a self,
key: &'key [u8]
) -> Result<Option<DBValue>, TrieHash<L>, CError<L>> where
'a: 'key, [src]
fn get<'a, 'key>(
&'a self,
key: &'key [u8]
) -> Result<Option<DBValue>, TrieHash<L>, CError<L>> where
'a: 'key, [src]What is the value of the given key in this trie?
Auto Trait Implementations
impl<'db, L> !RefUnwindSafe for FatDBMut<'db, L>
impl<'db, L> Send for FatDBMut<'db, L>
impl<'db, L> Sync for FatDBMut<'db, L>
impl<'db, L> Unpin for FatDBMut<'db, L> where
<<L as TrieLayout>::Hash as Hasher>::Out: Unpin,
<<L as TrieLayout>::Hash as Hasher>::Out: Unpin,