Trait sparse_merkle_tree::traits::Store[][src]

pub trait Store<V> {
    fn get_branch(&self, node: &H256) -> Result<Option<BranchNode>, Error>;
fn get_leaf(&self, leaf_hash: &H256) -> Result<Option<LeafNode<V>>, Error>;
fn insert_branch(
        &mut self,
        node: H256,
        branch: BranchNode
    ) -> Result<(), Error>;
fn insert_leaf(
        &mut self,
        leaf_hash: H256,
        leaf: LeafNode<V>
    ) -> Result<(), Error>;
fn remove_branch(&mut self, node: &H256) -> Result<(), Error>;
fn remove_leaf(&mut self, leaf_hash: &H256) -> Result<(), Error>; }

Trait for customize backend storage

Required methods

fn get_branch(&self, node: &H256) -> Result<Option<BranchNode>, Error>[src]

fn get_leaf(&self, leaf_hash: &H256) -> Result<Option<LeafNode<V>>, Error>[src]

fn insert_branch(&mut self, node: H256, branch: BranchNode) -> Result<(), Error>[src]

fn insert_leaf(
    &mut self,
    leaf_hash: H256,
    leaf: LeafNode<V>
) -> Result<(), Error>
[src]

fn remove_branch(&mut self, node: &H256) -> Result<(), Error>[src]

fn remove_leaf(&mut self, leaf_hash: &H256) -> Result<(), Error>[src]

Loading content...

Implementors

impl<V: Clone> Store<V> for DefaultStore<V>[src]

Loading content...