Skip to main content

BuildSeededHasher

Trait BuildSeededHasher 

Source
pub trait BuildSeededHasher {
    type Hasher: Hasher;

    // Required method
    fn build_hasher(&self, seed: u64) -> Self::Hasher;

    // Provided method
    fn hash_one<T>(&self, x: T, seed: u64) -> u64
       where T: Hash { ... }
}
Expand description

Family of hash functions that allows the creation of Hasher instances initialized with a given seed.

Required Associated Types§

Required Methods§

Source

fn build_hasher(&self, seed: u64) -> Self::Hasher

Creates a new hasher initialized with the given 64-bit seed.

Provided Methods§

Source

fn hash_one<T>(&self, x: T, seed: u64) -> u64
where T: Hash,

Calculates the hash of a single value x, using given 64-bit seed.

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§