Trait std::hash::HashStable [-] [+] [src]

pub trait Hash {
    fn hash<H>(&self, state: &mut H) where H: Hasher;

    fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher { ... }
}

A hashable type.

The H type parameter is an abstract hash state that is used by the Hash to compute the hash. Specific implementations of this trait may specialize for particular instances of H in order to be able to optimize the hashing behavior.

Required Methods

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

Feeds this value into the state given, updating the hasher as necessary.

Provided Methods

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

Feeds a slice of this type into the state provided.

Implementors