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

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

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

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: Hasher>(&self, state: &mut H)

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

Provided Methods

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

Feeds a slice of this type into the state provided.

Implementors