Skip to main content

Fingerprint

Trait Fingerprint 

Source
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§

Source

fn fingerprint<H: Hasher>(&self, state: &mut H)

Feed this value into the given Hasher.

Provided Methods§

Source

fn fingerprint_slice<H: Hasher>(data: &[Self], state: &mut H)
where Self: Sized,

Feeds a slice of this type into the given Hasher.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§