Struct patricia_trie::sectriedbmut::SecTrieDBMut[][src]

pub struct SecTrieDBMut<'db, H, C> where
    H: Hasher + 'db,
    C: NodeCodec<H>, 
{ /* fields omitted */ }

A mutable Trie implementation which hashes keys and uses a generic HashDB backing database.

Use it as a Trie or TrieMut trait object. You can use raw() to get the backing TrieDBMut object.

Methods

impl<'db, H, C> SecTrieDBMut<'db, H, C> where
    H: Hasher,
    C: NodeCodec<H>, 
[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.

Create a new trie with the backing database db and root.

Returns an error if root does not exist.

Get the backing database.

Get the backing database.

Trait Implementations

impl<'db, H, C> TrieMut<H, C> for SecTrieDBMut<'db, H, C> where
    H: Hasher,
    C: NodeCodec<H>, 
[src]

Return the root of the trie.

Is the trie empty?

Does the trie contain a given key?

What is the value of the given key in this trie?

Insert a key/value pair into the trie. An empty value is equivalent to removing key from the trie. Returns the old value associated with this key, if it existed. Read more

Remove a key from the trie. Equivalent to making it equal to the empty value. Returns the old value associated with this key, if it existed. Read more

Auto Trait Implementations

impl<'db, H, C> Send for SecTrieDBMut<'db, H, C> where
    C: Send,
    <H as Hasher>::Out: Send

impl<'db, H, C> Sync for SecTrieDBMut<'db, H, C> where
    C: Sync,
    <H as Hasher>::Out: Sync