phf

Trait PhfHash

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

    // Provided method
    fn phf_hash_slice<H>(data: &[Self], state: &mut H)
       where H: Hasher,
             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>(&self, state: &mut H)
where H: Hasher,

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

Provided Methods§

source

fn phf_hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, 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>(&self, state: &mut H)
where H: Hasher,

source§

impl PhfHash for char

source§

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

source§

impl PhfHash for i8

source§

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

source§

impl PhfHash for i16

source§

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

source§

impl PhfHash for i32

source§

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

source§

impl PhfHash for i64

source§

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

source§

impl PhfHash for i128

source§

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

source§

impl PhfHash for isize

source§

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

source§

impl PhfHash for str

source§

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

source§

impl PhfHash for u8

source§

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

source§

impl PhfHash for u16

source§

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

source§

impl PhfHash for u32

source§

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

source§

impl PhfHash for u64

source§

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

source§

impl PhfHash for u128

source§

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

source§

impl PhfHash for usize

source§

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

source§

impl PhfHash for String

source§

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

source§

impl PhfHash for Vec<u8>

source§

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

source§

impl PhfHash for [bool]

source§

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

source§

impl PhfHash for [char]

source§

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

source§

impl PhfHash for [i8]

source§

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

source§

impl PhfHash for [i16]

source§

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

source§

impl PhfHash for [i32]

source§

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

source§

impl PhfHash for [i64]

source§

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

source§

impl PhfHash for [i128]

source§

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

source§

impl PhfHash for [isize]

source§

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

source§

impl PhfHash for [u8]

source§

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

source§

impl PhfHash for [u16]

source§

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

source§

impl PhfHash for [u32]

source§

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

source§

impl PhfHash for [u64]

source§

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

source§

impl PhfHash for [u128]

source§

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

source§

impl PhfHash for [usize]

source§

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

source§

impl<'a, T> PhfHash for &'a T
where T: 'a + PhfHash + ?Sized,

source§

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

source§

impl<const N: usize> PhfHash for [bool; N]

source§

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

source§

impl<const N: usize> PhfHash for [char; N]

source§

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

source§

impl<const N: usize> PhfHash for [i8; N]

source§

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

source§

impl<const N: usize> PhfHash for [i16; N]

source§

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

source§

impl<const N: usize> PhfHash for [i32; N]

source§

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

source§

impl<const N: usize> PhfHash for [i64; N]

source§

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

source§

impl<const N: usize> PhfHash for [i128; N]

source§

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

source§

impl<const N: usize> PhfHash for [isize; N]

source§

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

source§

impl<const N: usize> PhfHash for [u8; N]

source§

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

source§

impl<const N: usize> PhfHash for [u16; N]

source§

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

source§

impl<const N: usize> PhfHash for [u32; N]

source§

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

source§

impl<const N: usize> PhfHash for [u64; N]

source§

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

source§

impl<const N: usize> PhfHash for [u128; N]

source§

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

source§

impl<const N: usize> PhfHash for [usize; N]

source§

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

Implementors§