pub trait Hash {
// Required method
fn hash<H>(&self, state: &mut H)
where H: Hasher;
// Provided method
fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher,
Self: Sized { ... }
}Expand description
Custom trait to avoid issues like https://github.com/rust-lang/rust/issues/27108.
Required Methods§
Provided Methods§
fn hash_slice<H>(data: &[Self], state: &mut H)
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.