pub trait TypeHash {
// Required method
fn write_hash(hasher: &mut impl Hasher);
// Provided method
fn type_hash() -> u64 { ... }
}
Expand description
A hash of a type’s structure
Required Methods§
Sourcefn write_hash(hasher: &mut impl Hasher)
fn write_hash(hasher: &mut impl Hasher)
Write the structure of the type to the hasher
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.