Type Alias TrieDBMutV0
pub type TrieDBMutV0<'a, H> = TrieDBMut<'a, LayoutV0<H>>;
Expand description
Persistent trie database write-access interface for a given hasher.
Aliased Type§
struct TrieDBMutV0<'a, H> { /* private fields */ }
Implementations
Trait Implementations
§impl<'a, L> TrieMut<L> for TrieDBMut<'a, L>where
L: TrieLayout,
impl<'a, L> TrieMut<L> for TrieDBMut<'a, L>where
L: TrieLayout,
§fn get<'x, 'key>(
&'x self,
key: &'key [u8],
) -> Result<Option<Vec<u8>>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>>>where
'x: 'key,
fn get<'x, 'key>(
&'x self,
key: &'key [u8],
) -> Result<Option<Vec<u8>>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>>>where
'x: 'key,
What is the value of the given key in this trie?
§fn insert(
&mut self,
key: &[u8],
value: &[u8],
) -> Result<Option<Value<L>>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>>>
fn insert( &mut self, key: &[u8], value: &[u8], ) -> Result<Option<Value<L>>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>>>
Insert a
key
/value
pair into the trie. An empty value is equivalent to removing
key
from the trie. Returns the old value associated with this key, if it existed.§fn remove(
&mut self,
key: &[u8],
) -> Result<Option<Value<L>>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>>>
fn remove( &mut self, key: &[u8], ) -> Result<Option<Value<L>>, Box<TrieError<<<L as TrieLayout>::Hash as Hasher>::Out, <<L as TrieLayout>::Codec as NodeCodec>::Error>>>
Remove a
key
from the trie. Equivalent to making it equal to the empty
value. Returns the old value associated with this key, if it existed.