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.
Required Associated Types§
Required Methods§
Provided Methods§
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.