Struct patricia_trie::sectriedb::SecTrieDB[][src]

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

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

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

Methods

impl<'db, H, C> SecTrieDB<'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. Returns an error if root does not exist.

Get a reference to the underlying raw TrieDB struct.

Get a mutable reference to the underlying raw TrieDB struct.

Trait Implementations

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

Return the root of the trie.

Does the trie contain a given key?

Search for the key with the given query parameter. See the docs of the Query trait for more details. Read more

Returns a depth-first iterator over the elements of trie.

Is the trie empty?

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

Auto Trait Implementations

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

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