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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§