Struct trie::Change
[−]
[src]
pub struct Change { pub adds: HashMap<H256, Vec<u8>>, pub removes: HashSet<H256>, }
Change for a merkle trie operation.
Fields
adds: HashMap<H256, Vec<u8>>
Additions to the database.
removes: HashSet<H256>
Removals to the database.
Methods
impl Change
[src]
fn add_raw(&mut self, key: H256, value: Vec<u8>)
[src]
Change to add a new raw value.
fn add_node<'a, 'b, 'c>(&'a mut self, node: &'c MerkleNode<'b>)
[src]
Change to add a new node.
fn add_value<'a, 'b, 'c>(
&'a mut self,
node: &'c MerkleNode<'b>
) -> MerkleValue<'b>
[src]
&'a mut self,
node: &'c MerkleNode<'b>
) -> MerkleValue<'b>
Change to add a new node, and return the value added.
fn remove_raw(&mut self, key: H256)
[src]
Change to remove a raw key.
fn remove_node<'a, 'b, 'c>(&'a mut self, node: &'c MerkleNode<'b>) -> bool
[src]
Change to remove a node. Return whether there's any node being removed.
fn merge(&mut self, other: &Change)
[src]
Merge another change to this change.