Trait phf::PhfHash [] [src]

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

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

A trait implemented by types which can be used in PHF data structures.

This differs from the standard library's Hash trait in that PhfHash's results must be architecture independent so that hashes will be consistent between the host and target when cross compiling.

Required Methods

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

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

Provided Methods

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

Feeds a slice of this type into the state provided.

Implementors