phf_shared

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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 i128

Source§

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

Source§

impl PhfHash for isize

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 u128

Source§

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

Source§

impl PhfHash for usize

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 [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 [i128]

Source§

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

Source§

impl PhfHash for [isize]

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 [u128]

Source§

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

Source§

impl PhfHash for [usize]

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§