Enum patricia_trie::TrieKinds [−][src]
pub enum TrieKinds<'db, H: Hasher + 'db, C: NodeCodec<H>> { Generic(TrieDB<'db, H, C>), Secure(SecTrieDB<'db, H, C>), Fat(FatDB<'db, H, C>), }
All different kinds of tries. This is used to prevent a heap allocation for every created trie.
Variants
Generic(TrieDB<'db, H, C>)A generic trie db.
Secure(SecTrieDB<'db, H, C>)A secure trie db.
Fat(FatDB<'db, H, C>)A fat trie db.
Trait Implementations
impl<'db, H: Hasher, C: NodeCodec<H>> Trie<H, C> for TrieKinds<'db, H, C>[src]
impl<'db, H: Hasher, C: NodeCodec<H>> Trie<H, C> for TrieKinds<'db, H, C>fn root(&self) -> &H::Out[src]
fn root(&self) -> &H::OutReturn the root of the trie.
fn is_empty(&self) -> bool[src]
fn is_empty(&self) -> boolIs the trie empty?
fn contains(&self, key: &[u8]) -> Result<bool, H::Out, C::Error>[src]
fn contains(&self, key: &[u8]) -> Result<bool, H::Out, C::Error>Does the trie contain a given key?
fn get_with<'a, 'key, Q: Query<H>>(
&'a self,
key: &'key [u8],
query: Q
) -> Result<Option<Q::Item>, H::Out, C::Error> where
'a: 'key, [src]
fn get_with<'a, 'key, Q: Query<H>>(
&'a self,
key: &'key [u8],
query: Q
) -> Result<Option<Q::Item>, H::Out, C::Error> where
'a: 'key, Search for the key with the given query parameter. See the docs of the Query trait for more details. Read more
fn iter<'a>(
&'a self
) -> Result<Box<TrieIterator<H, C, Item = TrieItem<H::Out, C::Error>> + 'a>, H::Out, C::Error>[src]
fn iter<'a>(
&'a self
) -> Result<Box<TrieIterator<H, C, Item = TrieItem<H::Out, C::Error>> + 'a>, H::Out, C::Error>Returns a depth-first iterator over the elements of trie.
fn get<'a, 'key>(
&'a self,
key: &'key [u8]
) -> Result<Option<DBValue>, H::Out, C::Error> where
'a: 'key, [src]
fn get<'a, 'key>(
&'a self,
key: &'key [u8]
) -> Result<Option<DBValue>, H::Out, C::Error> where
'a: 'key, What is the value of the given key in this trie?