Trait core::hash::BuildHasher
[−]
[src]
pub trait BuildHasher { type Hasher: Hasher; fn build_hasher(&self) -> Self::Hasher; }
A BuildHasher
is typically used as a factory for instances of Hasher
which a HashMap
can then use to hash keys independently.
Note that for each instance of BuildHasher
the create hashers should be
identical. That is if the same stream of bytes is fed into each hasher the
same output will also be generated.
Associated Types
type Hasher: Hasher
Type of the hasher that will be created.
Required Methods
fn build_hasher(&self) -> Self::Hasher
Creates a new hasher.
Implementors
impl<H: Default + Hasher> BuildHasher for BuildHasherDefault<H>