pub trait LeafHash: Clone + Send + Sync {
type Hash: FieldTrait;
type Leaf: Clone + Send + Sync;
// Required method
fn hash_leaf(&self, leaf: &Self::Leaf) -> Result<Self::Hash>;
// Provided method
fn hash_leaves(&self, leaves: &[Self::Leaf]) -> Result<Vec<Self::Hash>> { ... }
}
Expand description
A trait for a Merkle leaf hash function.