Trait lrs::hash::Hash

Objects that can be hashed.

Syntax

trait Hash {
    /* Required methods */
    fn stateful_hash<H>(&self, h: &mut H) -> ()
        where H: Hasher,

    /* Provided methods */
    fn hash<H, S>(&self, seed: S) -> <H as Hasher>::Digest
        where H: Hasher,
              S: Into<<H as Hasher>::Seed>,
    fn hash_slice<H, S>(val: &[Self], seed: S) -> <H as Hasher>::Digest
        where H: Hasher,
              S: Into<<H as Hasher>::Seed>,
    fn stateful_hash_slice<H>(val: &[Self], h: &mut H) -> ()
        where H: Hasher,
}

Methods

ReceiverNameDescription
&selfhash

Returns the hash of the object.

hash_slice

Returns the hash of a slice of objects.

&selfstateful_hash

Hashes the object into a hasher.

stateful_hash_slice

Hashes a slice of objects into a hasher.