pub trait HashComponent {
// Required method
fn hash_component(&self, hasher: &mut ComponentHasher);
// Provided method
fn compute_hash(&self) -> i32 { ... }
}Expand description
Trait for types that can be hashed for component validation.
Required Methods§
Sourcefn hash_component(&self, hasher: &mut ComponentHasher)
fn hash_component(&self, hasher: &mut ComponentHasher)
Hashes this value into the given hasher.
Provided Methods§
Sourcefn compute_hash(&self) -> i32
fn compute_hash(&self) -> i32
Computes the hash of this value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".