[−][src]Struct trie_db::FatDBMut
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][−]
L: TrieLayout,
pub fn new(
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Self[src][−]
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Self
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.
pub fn from_existing(
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Result<Self, TrieHash<L>, CError<L>>[src][−]
db: &'db mut dyn HashDB<L::Hash, DBValue>,
root: &'db mut TrieHash<L>
) -> Result<Self, TrieHash<L>, CError<L>>
Create a new trie with the backing database db and root.
Returns an error if root does not exist.
pub fn db(&self) -> &dyn HashDB<L::Hash, DBValue>[src][−]
Get the backing database.
pub fn db_mut(&mut self) -> &mut dyn HashDB<L::Hash, DBValue>[src][−]
Get the backing database.
Trait Implementations
impl<'db, L> TrieMut<L> for FatDBMut<'db, L> where
L: TrieLayout, [src][+]
L: TrieLayout,
Auto Trait Implementations
impl<'db, L> !RefUnwindSafe for FatDBMut<'db, L>
impl<'db, L> Send for FatDBMut<'db, L> where
<L as TrieLayout>::Hash: Hasher,
<<L as TrieLayout>::Hash as Hasher>::Out: Send,
<L as TrieLayout>::Hash: Hasher,
<<L as TrieLayout>::Hash as Hasher>::Out: Send,
impl<'db, L> Sync for FatDBMut<'db, L> where
<L as TrieLayout>::Hash: Hasher,
<<L as TrieLayout>::Hash as Hasher>::Out: Sync,
<L as TrieLayout>::Hash: Hasher,
<<L as TrieLayout>::Hash as Hasher>::Out: Sync,
impl<'db, L> Unpin for FatDBMut<'db, L> where
<L as TrieLayout>::Hash: Hasher,
<<L as TrieLayout>::Hash as Hasher>::Out: Unpin,
<L as TrieLayout>::Hash: Hasher,
<<L as TrieLayout>::Hash as Hasher>::Out: Unpin,
impl<'db, L> !UnwindSafe for FatDBMut<'db, L>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src][+]
T: ?Sized,
impl<T> From<T> for T[src][+]
impl<T, U> Into<U> for T where
U: From<T>, [src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src][+]
U: TryFrom<T>,