Trait phf_shared::PhfHash

source ·
pub trait PhfHash {
    // Required method
    fn phf_hash<H: Hasher>(&self, state: &mut H);

    // Provided method
    fn phf_hash_slice<H: Hasher>(data: &[Self], state: &mut H)
       where Self: Sized { ... }
}
Expand description

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§

source

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

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

Provided Methods§

source

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

Feeds a slice of this type into the state provided.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PhfHash for bool

source§

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

source§

impl PhfHash for char

source§

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

source§

impl PhfHash for i8

source§

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

source§

impl PhfHash for i16

source§

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

source§

impl PhfHash for i32

source§

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

source§

impl PhfHash for i64

source§

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

source§

impl PhfHash for str

source§

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

source§

impl PhfHash for u8

source§

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

source§

impl PhfHash for u16

source§

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

source§

impl PhfHash for u32

source§

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

source§

impl PhfHash for u64

source§

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

source§

impl PhfHash for String

source§

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

source§

impl PhfHash for Vec<u8>

source§

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

source§

impl PhfHash for [u8; 1]

source§

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

source§

impl PhfHash for [u8; 2]

source§

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

source§

impl PhfHash for [u8; 3]

source§

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

source§

impl PhfHash for [u8; 4]

source§

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

source§

impl PhfHash for [u8; 5]

source§

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

source§

impl PhfHash for [u8; 6]

source§

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

source§

impl PhfHash for [u8; 7]

source§

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

source§

impl PhfHash for [u8; 8]

source§

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

source§

impl PhfHash for [u8; 9]

source§

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

source§

impl PhfHash for [u8; 10]

source§

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

source§

impl PhfHash for [u8; 11]

source§

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

source§

impl PhfHash for [u8; 12]

source§

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

source§

impl PhfHash for [u8; 13]

source§

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

source§

impl PhfHash for [u8; 14]

source§

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

source§

impl PhfHash for [u8; 15]

source§

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

source§

impl PhfHash for [u8; 16]

source§

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

source§

impl PhfHash for [u8; 17]

source§

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

source§

impl PhfHash for [u8; 18]

source§

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

source§

impl PhfHash for [u8; 19]

source§

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

source§

impl PhfHash for [u8; 20]

source§

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

source§

impl PhfHash for [u8; 21]

source§

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

source§

impl PhfHash for [u8; 22]

source§

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

source§

impl PhfHash for [u8; 23]

source§

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

source§

impl PhfHash for [u8; 24]

source§

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

source§

impl PhfHash for [u8; 25]

source§

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

source§

impl PhfHash for [u8; 26]

source§

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

source§

impl PhfHash for [u8; 27]

source§

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

source§

impl PhfHash for [u8; 28]

source§

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

source§

impl PhfHash for [u8; 29]

source§

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

source§

impl PhfHash for [u8; 30]

source§

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

source§

impl PhfHash for [u8; 31]

source§

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

source§

impl PhfHash for [u8; 32]

source§

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

source§

impl PhfHash for [u8]

source§

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

source§

impl<'a> PhfHash for &'a str

source§

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

source§

impl<'a> PhfHash for &'a [u8]

source§

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

Implementors§