[−][src]Trait reference_trie::Trie 
A key-value datastore implemented as a database-backed modified Merkle tree.
Required methods
fn root(&self) -> &<H as Hasher>::Out
Return the root of the trie.
fn get_with<'a, 'key, Q>(
    &'a self, 
    key: &'key [u8], 
    query: Q
) -> Result<Option<<Q as Query<H>>::Item>, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>> where
    'a: 'key,
    Q: Query<H>, 
&'a self,
key: &'key [u8],
query: Q
) -> Result<Option<<Q as Query<H>>::Item>, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>> where
'a: 'key,
Q: Query<H>,
Search for the key with the given query parameter. See the docs of the Query
trait for more details.
fn iter(
    &'a self
) -> Result<Box<dyn TrieIterator<H, C, Item = Result<(Vec<u8>, ElasticArray128<u8>), Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>>> + 'a>, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>>
&'a self
) -> Result<Box<dyn TrieIterator<H, C, Item = Result<(Vec<u8>, ElasticArray128<u8>), Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>>> + 'a>, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>>
Returns a depth-first iterator over the elements of trie.
Provided methods
fn is_empty(&self) -> bool
Is the trie empty?
fn contains(
    &self, 
    key: &[u8]
) -> Result<bool, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>>
&self,
key: &[u8]
) -> Result<bool, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>>
Does the trie contain a given key?
fn get<'a, 'key>(
    &'a self, 
    key: &'key [u8]
) -> Result<Option<ElasticArray128<u8>>, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>> where
    'a: 'key, 
&'a self,
key: &'key [u8]
) -> Result<Option<ElasticArray128<u8>>, Box<TrieError<<H as Hasher>::Out, <C as NodeCodec<H>>::Error>>> where
'a: 'key,
What is the value of the given key in this trie?
Implementations on Foreign Types
impl<'db, H, C> Trie<H, C> for TrieKinds<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, [src] 
impl<'db, H, C> Trie<H, C> for TrieKinds<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, | fn root(&self) -> &<H as Hasher>::Out | [src] | 
| fn is_empty(&self) -> bool | [src] | 
| fn contains( | [src] | 
| fn get_with<'a, 'key, Q>( | [src] | 
| fn iter( | [src] | 
| fn get<'a, 'key>( | [src] | 
impl<'db, H, C> Trie<H, C> for FatDB<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, [src] 
impl<'db, H, C> Trie<H, C> for FatDB<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, | fn root(&self) -> &<H as Hasher>::Out | [src] | 
| fn contains( | [src] | 
| fn get_with<'a, 'key, Q>( | [src] | 
| fn iter( | [src] | 
| fn is_empty(&self) -> bool | [src] | 
| fn get<'a, 'key>( | [src] | 
impl<'db, H, C> Trie<H, C> for SecTrieDB<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, [src] 
impl<'db, H, C> Trie<H, C> for SecTrieDB<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, | fn root(&self) -> &<H as Hasher>::Out | [src] | 
| fn contains( | [src] | 
| fn get_with<'a, 'key, Q>( | [src] | 
| fn iter( | [src] | 
| fn is_empty(&self) -> bool | [src] | 
| fn get<'a, 'key>( | [src] | 
impl<'db, H, C> Trie<H, C> for TrieDB<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, [src] 
impl<'db, H, C> Trie<H, C> for TrieDB<'db, H, C> where
    C: NodeCodec<H>,
    H: Hasher, | fn root(&self) -> &<H as Hasher>::Out | [src] | 
| fn get_with<'a, 'key, Q>( | [src] | 
| fn iter( | [src] | 
| fn is_empty(&self) -> bool | [src] | 
| fn contains( | [src] | 
| fn get<'a, 'key>( | [src] |