Enum trie_db::TrieAccess
source · [−]pub enum TrieAccess<'a, H> {
NodeOwned {
hash: H,
node_owned: &'a NodeOwned<H>,
},
EncodedNode {
hash: H,
encoded_node: Cow<'a, [u8]>,
},
Value {
hash: H,
value: Cow<'a, [u8]>,
full_key: &'a [u8],
},
Hash {
full_key: &'a [u8],
},
NonExisting {
full_key: &'a [u8],
},
}
Expand description
Used to report the trie access to the TrieRecorder
.
As the trie can use a TrieCache
, there are multiple kinds of accesses.
If a cache is used, [Self::Key
] and Self::NodeOwned
are possible
values. Otherwise only Self::EncodedNode
is a possible value.
Variants
NodeOwned
The given NodeOwned
was accessed using its hash
.
EncodedNode
The given encoded_node
was accessed using its hash
.
Value
The given value
was accessed using its hash
.
The given full_key
is the key to access this value in the trie.
Should map to RecordedForKey::Value
when checking the recorder.
Hash
Fields
full_key: &'a [u8]
The hash of the value for the given full_key
was accessed.
Should map to RecordedForKey::Hash
when checking the recorder.
NonExisting
Fields
full_key: &'a [u8]
The value/hash for full_key
was accessed, but it couldn’t be found in the trie.
Should map to RecordedForKey::Value
when checking the recorder.
Trait Implementations
Auto Trait Implementations
impl<'a, H> RefUnwindSafe for TrieAccess<'a, H> where
H: RefUnwindSafe,
impl<'a, H> Send for TrieAccess<'a, H> where
H: Send + Sync,
impl<'a, H> Sync for TrieAccess<'a, H> where
H: Sync,
impl<'a, H> Unpin for TrieAccess<'a, H> where
H: Unpin,
impl<'a, H> UnwindSafe for TrieAccess<'a, H> where
H: UnwindSafe + RefUnwindSafe,
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