mithril_common::crypto_helper

Trait MKTreeStorer

source
pub trait MKTreeStorer:
    Clone
    + Send
    + Sync
    + MKTreeLeafIndexer {
    // Required methods
    fn build() -> StdResult<Self>;
    fn get_elem(&self, pos: u64) -> StdResult<Option<Arc<MKTreeNode>>>;
    fn append(&self, pos: u64, elems: Vec<Arc<MKTreeNode>>) -> StdResult<()>;
}
Expand description

The Merkle tree storer trait

Required Methods§

source

fn build() -> StdResult<Self>

Try to create a new instance of the storer

source

fn get_elem(&self, pos: u64) -> StdResult<Option<Arc<MKTreeNode>>>

Get the element at the given position

source

fn append(&self, pos: u64, elems: Vec<Arc<MKTreeNode>>) -> StdResult<()>

Append elements at the given position

Object Safety§

This trait is not object safe.

Implementors§