pub struct DecodedProofNodes(/* private fields */);
Expand description
A wrapper struct for trie node key to RLP encoded trie node.
Implementations§
Source§impl DecodedProofNodes
impl DecodedProofNodes
Sourcepub fn matching_nodes_iter<'a>(
&'a self,
target: &'a Nibbles,
) -> impl Iterator<Item = (&'a Nibbles, &'a TrieNode)>
pub fn matching_nodes_iter<'a>( &'a self, target: &'a Nibbles, ) -> impl Iterator<Item = (&'a Nibbles, &'a TrieNode)>
Return iterator over proof nodes that match the target.
Sourcepub fn matching_nodes(&self, target: &Nibbles) -> Vec<(Nibbles, TrieNode)>
pub fn matching_nodes(&self, target: &Nibbles) -> Vec<(Nibbles, TrieNode)>
Return the vec of proof nodes that match the target.
Sourcepub fn matching_nodes_sorted(
&self,
target: &Nibbles,
) -> Vec<(Nibbles, TrieNode)>
pub fn matching_nodes_sorted( &self, target: &Nibbles, ) -> Vec<(Nibbles, TrieNode)>
Return the sorted vec of proof nodes that match the target.
Sourcepub fn insert(&mut self, key: Nibbles, node: TrieNode) -> Option<TrieNode>
pub fn insert(&mut self, key: Nibbles, node: TrieNode) -> Option<TrieNode>
Insert the trie node at key.
Sourcepub fn insert_encoded(
&mut self,
key: Nibbles,
node: Bytes,
) -> Result<Option<TrieNode>, Error>
pub fn insert_encoded( &mut self, key: Nibbles, node: Bytes, ) -> Result<Option<TrieNode>, Error>
Insert the RLP encoded trie nodoe at key
Sourcepub fn nodes_sorted(&self) -> Vec<(Nibbles, TrieNode)>
pub fn nodes_sorted(&self) -> Vec<(Nibbles, TrieNode)>
Return the sorted vec of all proof nodes.
Sourcepub fn into_nodes_sorted(self) -> Vec<(Nibbles, TrieNode)>
pub fn into_nodes_sorted(self) -> Vec<(Nibbles, TrieNode)>
Convert into sorted vec of all proof nodes.
Sourcepub fn into_inner(self) -> HashMap<Nibbles, TrieNode>
pub fn into_inner(self) -> HashMap<Nibbles, TrieNode>
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 DecodedProofNodes
.
Trait Implementations§
Source§impl Clone for DecodedProofNodes
impl Clone for DecodedProofNodes
Source§fn clone(&self) -> DecodedProofNodes
fn clone(&self) -> DecodedProofNodes
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 DecodedProofNodes
impl Debug for DecodedProofNodes
Source§impl Default for DecodedProofNodes
impl Default for DecodedProofNodes
Source§fn default() -> DecodedProofNodes
fn default() -> DecodedProofNodes
Returns the “default value” for a type. Read more
Source§impl Deref for DecodedProofNodes
impl Deref for DecodedProofNodes
Source§impl<'de> Deserialize<'de> for DecodedProofNodes
impl<'de> Deserialize<'de> for DecodedProofNodes
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Extend<(Nibbles, TrieNode)> for DecodedProofNodes
impl Extend<(Nibbles, TrieNode)> for DecodedProofNodes
Source§fn extend<T: IntoIterator<Item = (Nibbles, TrieNode)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (Nibbles, TrieNode)>>(&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, TrieNode)> for DecodedProofNodes
impl FromIterator<(Nibbles, TrieNode)> for DecodedProofNodes
Source§impl PartialEq for DecodedProofNodes
impl PartialEq for DecodedProofNodes
Source§impl Serialize for DecodedProofNodes
impl Serialize for DecodedProofNodes
Source§impl TryFrom<ProofNodes> for DecodedProofNodes
impl TryFrom<ProofNodes> for DecodedProofNodes
impl Eq for DecodedProofNodes
impl StructuralPartialEq for DecodedProofNodes
Auto Trait Implementations§
impl Freeze for DecodedProofNodes
impl RefUnwindSafe for DecodedProofNodes
impl Send for DecodedProofNodes
impl Sync for DecodedProofNodes
impl Unpin for DecodedProofNodes
impl UnwindSafe for DecodedProofNodes
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.