pub struct TestTrieCache<L: TrieLayout> { /* private fields */ }
Expand description
Example trie cache implementation.
Should not be used for anything in production.
Implementations§
Source§impl<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§
Source§impl<L: TrieLayout> Default for TestTrieCache<L>
impl<L: TrieLayout> Default for TestTrieCache<L>
Source§impl<L: TrieLayout> TrieCache<<L as TrieLayout>::Codec> for TestTrieCache<L>
impl<L: TrieLayout> TrieCache<<L as TrieLayout>::Codec> for TestTrieCache<L>
Source§fn 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 moreSource§fn 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>>)
Auto Trait Implementations§
impl<L> Freeze for TestTrieCache<L>
impl<L> RefUnwindSafe for TestTrieCache<L>
impl<L> Send for TestTrieCache<L>
impl<L> Sync for TestTrieCache<L>
impl<L> Unpin for TestTrieCache<L>
impl<L> UnwindSafe for TestTrieCache<L>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more