pub trait BuildSeededHasher {
    type Hasher: Hasher;

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

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

Trait possessed by families of hash functions that allow the creation of Hasher instances initialized with a given seed.

Required Associated Types§

Required Methods§

source

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

Creates a new hasher initialized with the given seed.

Provided Methods§

source

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

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

Object Safety§

This trait is not object safe.

Implementors§