Trait anyhash::BuildHasher

source ·
pub trait BuildHasher<T> {
    type Hasher: Hasher<T>;

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

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

A trait for creating instances of Hasher that make hashes of type T.

Required Associated Types§

source

type Hasher: Hasher<T>

Type of the hasher that will be created.

Required Methods§

source

fn build_hasher(&self) -> Self::Hasher

Creates a new hasher.

Provided Methods§

source

fn hash_one<U: Hash>(&self, x: U) -> T

Calculates the hash of a single value.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl BuildHasher<u64> for Xxh64BuildHasher

Available on crate feature xxh64 only.
source§

impl<T, BH: BuildHasher<T>> BuildHasher<T> for HasherBeBuildHasher<BH>

§

type Hasher = HasherBe<T, <BH as BuildHasher<T>>::Hasher>

source§

impl<T, BH: BuildHasher<T>> BuildHasher<T> for HasherLeBuildHasher<BH>

§

type Hasher = HasherLe<T, <BH as BuildHasher<T>>::Hasher>

source§

impl<T, H: Hasher<T> + Default> BuildHasher<T> for BuildHasherDefault<H>

§

type Hasher = H

source§

impl<T: Type, V: Version> BuildHasher<T> for FnvBuildHasher<T, V>

Available on crate feature fnv only.
§

type Hasher = Fnv<T, V>

source§

impl<T: Type, V: Version> BuildHasher<T> for FnvBuildHasherDefault<V>

Available on crate feature fnv only.
§

type Hasher = Fnv<T, V>

source§

impl<V: Version> BuildHasher<u32> for SpookyVBuildHasher<V>

Available on crate feature spooky only.
§

type Hasher = SpookyV<V>

source§

impl<V: Version> BuildHasher<u32> for SpookyVBuildHasherDefault<V>

Available on crate feature spooky only.
§

type Hasher = SpookyV<V>

source§

impl<V: Version> BuildHasher<u64> for SpookyVBuildHasher<V>

Available on crate feature spooky only.
§

type Hasher = SpookyV<V>

source§

impl<V: Version> BuildHasher<u64> for SpookyVBuildHasherDefault<V>

Available on crate feature spooky only.
§

type Hasher = SpookyV<V>

source§

impl<V: Version> BuildHasher<u128> for SpookyVBuildHasher<V>

Available on crate feature spooky only.
§

type Hasher = SpookyV<V>

source§

impl<V: Version> BuildHasher<u128> for SpookyVBuildHasherDefault<V>

Available on crate feature spooky only.
§

type Hasher = SpookyV<V>