Trait CallHasher

Source
pub(crate) trait CallHasher {
    // Required method
    fn get_hash<H: Hash + ?Sized>(value: &H, random_state: &RandomState) -> 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>(value: &H, random_state: &RandomState) -> u64

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.

Implementors§

Source§

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