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>),
}
Expand description
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
sourceimpl<'db, H: Hasher, C: NodeCodec<H>> Trie<H, C> for TrieKinds<'db, H, C>
impl<'db, H: Hasher, C: NodeCodec<H>> Trie<H, C> for TrieKinds<'db, H, C>
sourcefn contains(&self, key: &[u8]) -> Result<bool, H::Out, C::Error>
fn contains(&self, key: &[u8]) -> Result<bool, H::Out, C::Error>
Does the trie contain a given key?
sourcefn 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,
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
Auto Trait Implementations
impl<'db, H, C> !RefUnwindSafe for TrieKinds<'db, H, C>
impl<'db, H, C> !Send for TrieKinds<'db, H, C>
impl<'db, H, C> !Sync for TrieKinds<'db, H, C>
impl<'db, H, C> Unpin for TrieKinds<'db, H, C> where
C: Unpin,
impl<'db, H, C> !UnwindSafe for TrieKinds<'db, H, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more