pub trait HashDigest<T> {
type Digest;
// Required method
fn hash(data: impl AsRef<[T]>) -> Self::Digest;
}
Expand description
Trait representing the simplest and most straight forward use case of a hash function
This is a highly simplified trait that just treats the entire interface of a hash as a simple function that takes in a slice of inputs and gives you back an output.
Required Associated Types§
Required 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.