pub trait Trie<L: TrieLayout> {
    fn root(&self) -> &TrieHash<L>;
fn get_with<'a, 'key, Q: Query<L::Hash>>(
        &'a self,
        key: &'key [u8],
        query: Q
    ) -> Result<Option<Q::Item>, TrieHash<L>, CError<L>>
    where
        'a: 'key
;
fn iter<'a>(
        &'a self
    ) -> Result<Box<dyn TrieIterator<L, Item = TrieItem<'_, TrieHash<L>, CError<L>>> + 'a>, TrieHash<L>, CError<L>>; fn is_empty(&self) -> bool { ... }
fn contains(&self, key: &[u8]) -> Result<bool, TrieHash<L>, CError<L>> { ... }
fn get<'a, 'key>(
        &'a self,
        key: &'key [u8]
    ) -> Result<Option<DBValue>, TrieHash<L>, CError<L>>
    where
        'a: 'key
, { ... } }
Expand description

A key-value datastore implemented as a database-backed modified Merkle tree.

Required methods

Return the root of the trie.

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

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

Provided methods

Is the trie empty?

Does the trie contain a given key?

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

Implementors