Trait ahash::specialize::CallHasher

source ·
pub(crate) trait CallHasher {
    // Required method
    fn get_hash<H: Hash + ?Sized, B: BuildHasher>(
        value: &H,
        build_hasher: &B,
    ) -> u64;
}
Expand description

Provides a way to get an optimized hasher for a given data type. Rather than using a Hasher generically which can hash any value, this provides a way to get a specialized hash for a specific type. So this may be faster for primitive types.

Required Methods§

source

fn get_hash<H: Hash + ?Sized, B: BuildHasher>( value: &H, build_hasher: &B, ) -> u64

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> CallHasher for T
where T: Hash + ?Sized,