[][src]Trait merk::tree::Commit

pub trait Commit {
    fn write(&mut self, tree: &Tree) -> Result<()>;

    fn prune(&self, _tree: &Tree) -> (bool, bool) { ... }
}

To be used when committing a tree (writing it to a store after applying the changes).

Required methods

fn write(&mut self, tree: &Tree) -> Result<()>

Called once per updated node when a finalized tree is to be written to a backing store or cache.

Loading content...

Provided methods

fn prune(&self, _tree: &Tree) -> (bool, bool)

Called once per node after writing a node and its children. The returned tuple specifies whether or not to prune the left and right child nodes, respectively. For example, returning (true, true) will prune both nodes, removing them from memory.

Loading content...

Implementors

impl Commit for NoopCommit[src]

Loading content...