SubTreeWrite

Trait SubTreeWrite 

Source
pub trait SubTreeWrite {
    // Required methods
    fn subtree_update(
        &mut self,
        key: &Key,
        value: StorageBytes<'_>,
    ) -> Result<Hash, Error>;
    fn subtree_delete(&mut self, key: &Key) -> Result<Hash, Error>;
}
Expand description

Trait for updating a merkle tree that is a sub-tree of the global merkle tree

Required Methods§

Source

fn subtree_update( &mut self, key: &Key, value: StorageBytes<'_>, ) -> Result<Hash, Error>

Add a key-value pair to the sub-tree

Source

fn subtree_delete(&mut self, key: &Key) -> Result<Hash, Error>

Delete a key from the sub-tree

Implementors§