pub struct HashedPartialTrie { /* private fields */ }Expand description
A partial trie that lazily caches hashes for each node as needed.
If you are doing frequent hashing of node, you probably want to use this
Trie variant.
Trait Implementations§
Source§impl Clone for HashedPartialTrie
impl Clone for HashedPartialTrie
Source§fn clone(&self) -> HashedPartialTrie
fn clone(&self) -> HashedPartialTrie
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HashedPartialTrie
impl Debug for HashedPartialTrie
Source§impl Default for HashedPartialTrie
impl Default for HashedPartialTrie
Source§fn default() -> HashedPartialTrie
fn default() -> HashedPartialTrie
Returns the “default value” for a type. Read more
Source§impl Deref for HashedPartialTrie
impl Deref for HashedPartialTrie
Source§impl DerefMut for HashedPartialTrie
impl DerefMut for HashedPartialTrie
Source§impl<'de> Deserialize<'de> for HashedPartialTrie
impl<'de> Deserialize<'de> for HashedPartialTrie
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 From<Node<HashedPartialTrie>> for HashedPartialTrie
impl From<Node<HashedPartialTrie>> for HashedPartialTrie
Source§fn from(v: Node<HashedPartialTrie>) -> Self
fn from(v: Node<HashedPartialTrie>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HashedPartialTrie
impl PartialEq for HashedPartialTrie
Source§impl PartialTrie for HashedPartialTrie
impl PartialTrie for HashedPartialTrie
Source§fn new_with_strategy(node: Node<Self>, strategy: OnOrphanedHashNode) -> Self
fn new_with_strategy(node: Node<Self>, strategy: OnOrphanedHashNode) -> Self
Creates a new partial trie from a node with a provided collapse
strategy.
Source§fn insert<K, V>(&mut self, k: K, v: V) -> TrieOpResult<()>
fn insert<K, V>(&mut self, k: K, v: V) -> TrieOpResult<()>
Inserts a node into the trie.
Source§fn extend<K, V, I>(&mut self, nodes: I) -> TrieOpResult<()>
fn extend<K, V, I>(&mut self, nodes: I) -> TrieOpResult<()>
Add more nodes to the trie through an iterator
Source§fn items(&self) -> impl Iterator<Item = (Nibbles, ValOrHash)>
fn items(&self) -> impl Iterator<Item = (Nibbles, ValOrHash)>
Returns an iterator over the trie that returns all key/value pairs for
every
Leaf and Hash node.Source§fn keys(&self) -> impl Iterator<Item = Nibbles>
fn keys(&self) -> impl Iterator<Item = Nibbles>
Returns an iterator over the trie that returns all keys for every
Leaf
and Hash node.Source§impl Serialize for HashedPartialTrie
impl Serialize for HashedPartialTrie
Source§impl TrieNodeIntern for HashedPartialTrie
impl TrieNodeIntern for HashedPartialTrie
Source§fn hash_intern(&self) -> EncodedNode
fn hash_intern(&self) -> EncodedNode
Returns the hash of the rlp encoding of self.
Source§impl<K, V> TryFromIterator<(K, V)> for HashedPartialTrie
impl<K, V> TryFromIterator<(K, V)> for HashedPartialTrie
Source§fn try_from_iter<T: IntoIterator<Item = (K, V)>>(nodes: T) -> TrieOpResult<Self>
fn try_from_iter<T: IntoIterator<Item = (K, V)>>(nodes: T) -> TrieOpResult<Self>
Creates a value from an iterator within an allocator.
impl Eq for HashedPartialTrie
Auto Trait Implementations§
impl Freeze for HashedPartialTrie
impl !RefUnwindSafe for HashedPartialTrie
impl Send for HashedPartialTrie
impl Sync for HashedPartialTrie
impl Unpin for HashedPartialTrie
impl UnsafeUnpin for HashedPartialTrie
impl !UnwindSafe for HashedPartialTrie
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