pub trait HashOrNoHash {
// Required method
fn hash(data: &[u8]) -> Self;
}Expand description
HashOrNoHash is implemented for hash types (eg WorkPackageHash) and also NoHash.
NoHash is a unit type, used when we don’t care about the hash in question.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".