Struct reference_trie::TestTrieCache
source · [−]pub struct TestTrieCache<L: TrieLayout> { /* private fields */ }
Expand description
Example trie cache implementation.
Should not be used for anything in production.
Implementations
sourceimpl<L: TrieLayout> TestTrieCache<L>
impl<L: TrieLayout> TestTrieCache<L>
sourcepub fn clear_value_cache(&mut self)
pub fn clear_value_cache(&mut self)
Clear the value cache.
sourcepub fn clear_node_cache(&mut self)
pub fn clear_node_cache(&mut self)
Clear the node cache.
Trait Implementations
sourceimpl<L: TrieLayout> Default for TestTrieCache<L>
impl<L: TrieLayout> Default for TestTrieCache<L>
sourceimpl<L: TrieLayout> TrieCache<<L as TrieLayout>::Codec> for TestTrieCache<L>
impl<L: TrieLayout> TrieCache<<L as TrieLayout>::Codec> for TestTrieCache<L>
sourcefn lookup_value_for_key(
&mut self,
key: &[u8]
) -> Option<&CachedValue<TrieHash<L>>>
fn lookup_value_for_key(
&mut self,
key: &[u8]
) -> Option<&CachedValue<TrieHash<L>>>
Lookup value for the given key
. Read more
sourcefn cache_value_for_key(&mut self, key: &[u8], value: CachedValue<TrieHash<L>>)
fn cache_value_for_key(&mut self, key: &[u8], value: CachedValue<TrieHash<L>>)
Cache the given value
for the given key
. Read more
Auto Trait Implementations
impl<L> RefUnwindSafe for TestTrieCache<L> where
<<L as TrieLayout>::Hash as Hasher>::Out: RefUnwindSafe,
impl<L> Send for TestTrieCache<L>
impl<L> Sync for TestTrieCache<L>
impl<L> Unpin for TestTrieCache<L> where
<<L as TrieLayout>::Hash as Hasher>::Out: Unpin,
impl<L> UnwindSafe for TestTrieCache<L> where
<<L as TrieLayout>::Hash as Hasher>::Out: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more