Trait incrementalmerkletree::Hashable
source · pub trait Hashable: Debug {
// Required methods
fn empty_leaf() -> Self;
fn combine(level: Level, a: &Self, b: &Self) -> Self;
// Provided method
fn empty_root(level: Level) -> Self
where Self: Sized { ... }
}
Expand description
A trait describing the operations that make a type suitable for use as a leaf or node value in a merkle tree.
Required Methods§
fn empty_leaf() -> Self
Provided Methods§
sourcefn empty_root(level: Level) -> Selfwhere
Self: Sized,
fn empty_root(level: Level) -> Selfwhere
Self: Sized,
Produces an empty root at the specified level of the tree by combining empty leaf values.
At each successive level, the value is produced by combining the value at the level below with a copy of itself.
Object Safety§
This trait is not object safe.