pub struct ProofNodes(/* private fields */);
Expand description
A wrapper struct for trie node key to RLP encoded trie node.
Implementations§
Source§impl ProofNodes
impl ProofNodes
Sourcepub fn matching_nodes_iter<'a>(
&'a self,
target: &'a Nibbles,
) -> impl Iterator<Item = (&'a Nibbles, &'a Bytes)>
pub fn matching_nodes_iter<'a>( &'a self, target: &'a Nibbles, ) -> impl Iterator<Item = (&'a Nibbles, &'a Bytes)>
Return iterator over proof nodes that match the target.
Sourcepub fn matching_nodes(&self, target: &Nibbles) -> Vec<(Nibbles, Bytes)>
pub fn matching_nodes(&self, target: &Nibbles) -> Vec<(Nibbles, Bytes)>
Return the vec of proof nodes that match the target.
Sourcepub fn matching_nodes_sorted(&self, target: &Nibbles) -> Vec<(Nibbles, Bytes)>
pub fn matching_nodes_sorted(&self, target: &Nibbles) -> Vec<(Nibbles, Bytes)>
Return the sorted vec of proof nodes that match the target.
Sourcepub fn insert(&mut self, key: Nibbles, node: Bytes) -> Option<Bytes>
pub fn insert(&mut self, key: Nibbles, node: Bytes) -> Option<Bytes>
Insert the RLP encoded trie node at key.
Sourcepub fn nodes_sorted(&self) -> Vec<(Nibbles, Bytes)>
pub fn nodes_sorted(&self) -> Vec<(Nibbles, Bytes)>
Return the sorted vec of all proof nodes.
Sourcepub fn into_nodes_sorted(self) -> Vec<(Nibbles, Bytes)>
pub fn into_nodes_sorted(self) -> Vec<(Nibbles, Bytes)>
Convert into sorted vec of all proof nodes.
Sourcepub fn into_inner(self) -> HashMap<Nibbles, Bytes>
pub fn into_inner(self) -> HashMap<Nibbles, Bytes>
Convert wrapper struct into inner map.
Sourcepub fn extend_from(&mut self, other: Self)
pub fn extend_from(&mut self, other: Self)
Extends with the elements of another ProofNodes
.
Trait Implementations§
Source§impl Clone for ProofNodes
impl Clone for ProofNodes
Source§fn clone(&self) -> ProofNodes
fn clone(&self) -> ProofNodes
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProofNodes
impl Debug for ProofNodes
Source§impl Default for ProofNodes
impl Default for ProofNodes
Source§fn default() -> ProofNodes
fn default() -> ProofNodes
Returns the “default value” for a type. Read more
Source§impl Deref for ProofNodes
impl Deref for ProofNodes
Source§impl Extend<(Nibbles, Bytes)> for ProofNodes
impl Extend<(Nibbles, Bytes)> for ProofNodes
Source§fn extend<T: IntoIterator<Item = (Nibbles, Bytes)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (Nibbles, Bytes)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<(Nibbles, Bytes)> for ProofNodes
impl FromIterator<(Nibbles, Bytes)> for ProofNodes
Source§impl PartialEq for ProofNodes
impl PartialEq for ProofNodes
impl Eq for ProofNodes
impl StructuralPartialEq for ProofNodes
Auto Trait Implementations§
impl Freeze for ProofNodes
impl RefUnwindSafe for ProofNodes
impl Send for ProofNodes
impl Sync for ProofNodes
impl Unpin for ProofNodes
impl UnwindSafe for ProofNodes
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.