pub struct LeafNode {
pub key: Nibbles,
pub value: Vec<u8>,
}
Expand description
A leaf node represents the endpoint or terminal node in the trie. In other words, a leaf node is where actual values are stored.
A leaf node consists of two parts: the key (or path) and the value. The key is typically the remaining portion of the key after following the path through the trie, and the value is the data associated with the full key. When searching the trie for a specific key, reaching a leaf node means that the search has successfully found the value associated with that key.
Fields§
§key: Nibbles
The key for this leaf node.
value: Vec<u8>
The node value.
Implementations§
Source§impl LeafNode
impl LeafNode
Trait Implementations§
impl Eq for LeafNode
impl StructuralPartialEq for LeafNode
Auto Trait Implementations§
impl Freeze for LeafNode
impl RefUnwindSafe for LeafNode
impl Send for LeafNode
impl Sync for LeafNode
impl Unpin for LeafNode
impl UnwindSafe for LeafNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.