pub trait TotalHash {
// Required method
fn tot_hash<H>(&self, state: &mut H)
where H: Hasher;
// Provided method
fn tot_hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher,
Self: Sized { ... }
}
Expand description
Alternative trait for Hash. By consistently using this we can still be generic w.r.t Hash while being able to hash floats.
Required Methods§
Provided Methods§
fn tot_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.