Struct triedb::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.

Implementations

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(&mut self, node: &MerkleNode<'_>)[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(&mut self, node: &MerkleNode<'_>) -> 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 Clone for Change[src]

impl Debug for Change[src]

impl Default for Change[src]

Auto Trait Implementations

impl RefUnwindSafe for Change

impl Send for Change

impl Sync for Change

impl Unpin for Change

impl UnwindSafe for Change

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]