Trait mina_merkle::MerkleTree
source · [−]pub trait MerkleTree {
type Item;
type Hash;
fn height(&self) -> u32;
fn count(&self) -> usize;
fn root(&mut self) -> Option<Self::Hash>;
fn add_batch(&mut self, items: impl IntoIterator<Item = Self::Item>);
fn add(&mut self, item: Self::Item) { ... }
}
Expand description
Trait for implementing binary merkle tree
Required Associated Types
Required Methods
sourcefn add_batch(&mut self, items: impl IntoIterator<Item = Self::Item>)
fn add_batch(&mut self, items: impl IntoIterator<Item = Self::Item>)
Adds a batch of leaves in the give order