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§
Provided Methods§
Sourcefn phf_hash_slice<H: Hasher>(data: &[Self], state: &mut H)where
Self: Sized,
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.