Struct patricia_trie::FatDB[][src]

pub struct FatDB<'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. Additionaly it stores inserted hash-key mappings for later retrieval.

Use it as a Trie or TrieMut trait object.

Methods

impl<'db, H, C> FatDB<'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.

Get the backing database.

Trait Implementations

impl<'db, H, C> Trie<H, C> for FatDB<'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 FatDB<'db, H, C> where
    C: Send,
    <H as Hasher>::Out: Sync

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