pub trait LeafHash: Clone + Send + Sync {
type Hash: Copy + Clone + Debug + Default + PartialEq + Eq + FromBytes + ToBytes + Send + Sync;
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.
Required Associated Types§
type Hash: Copy + Clone + Debug + Default + PartialEq + Eq + FromBytes + ToBytes + Send + Sync
type Leaf: Clone + Send + Sync
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.