[][src]Struct trie::Change

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]

pub fn add_raw(&mut self, key: H256, value: Vec<u8>)[src]

Change to add a new raw value.

pub fn add_node<'a, 'b, 'c>(&'a mut self, node: &'c MerkleNode<'b>)[src]

Change to add a new node.

pub fn add_value<'a, 'b, 'c>(
    &'a mut self,
    node: &'c MerkleNode<'b>
) -> MerkleValue<'b>
[src]

Change to add a new node, and return the value added.

pub fn remove_raw(&mut self, key: H256)[src]

Change to remove a raw key.

pub 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.

pub fn merge(&mut self, other: &Change)[src]

Merge another change to this change.

Trait Implementations

impl Default for Change[src]

Auto Trait Implementations

impl Send for Change

impl Sync for Change

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self