pub trait Fingerprint {
// Required method
fn fingerprint<H: Hasher>(&self, state: &mut H);
// Provided method
fn fingerprint_slice<H: Hasher>(data: &[Self], state: &mut H)
where Self: Sized { ... }
}
Expand description
To assert Equivalence of two instances of an xAPI Data Type we rely on this Trait to help us compute a fingerprint for each instance. The computation of this fingerprint uses a recursive descent mechanism not unlike what the standard Hash does.
Required Methods§
Sourcefn fingerprint<H: Hasher>(&self, state: &mut H)
fn fingerprint<H: Hasher>(&self, state: &mut H)
Feed this value into the given 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.