Trait FastHash

Source
pub trait FastHash: BuildHasherExt {
    type Hash: PrimInt;
    type Seed: Default + Copy;

    // Required method
    fn hash_with_seed<T: AsRef<[u8]>>(bytes: T, seed: Self::Seed) -> Self::Hash;

    // Provided method
    fn hash<T: AsRef<[u8]>>(bytes: T) -> Self::Hash { ... }
}
Expand description

Fast non-cryptographic hash functions

Required Associated Types§

Source

type Hash: PrimInt

The output hash generated value.

Source

type Seed: Default + Copy

The seed to generate hash value.

Required Methods§

Source

fn hash_with_seed<T: AsRef<[u8]>>(bytes: T, seed: Self::Seed) -> Self::Hash

Hash functions for a byte array. For convenience, a seed is also hashed into the result.

Provided Methods§

Source

fn hash<T: AsRef<[u8]>>(bytes: T) -> Self::Hash

Hash functions for a byte array.

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 FastHash for fasthash::city::crc::Hash128

Source§

impl FastHash for fasthash::city::Hash32

Source§

impl FastHash for fasthash::city::Hash64

Source§

impl FastHash for fasthash::city::Hash128

Source§

impl FastHash for fasthash::farm::Hash32

Source§

impl FastHash for fasthash::farm::Hash64

Source§

impl FastHash for fasthash::farm::Hash128

Source§

impl FastHash for fasthash::lookup3::Hash32

Source§

impl FastHash for fasthash::metro::crc::Hash64_1

Source§

impl FastHash for fasthash::metro::crc::Hash64_2

Source§

impl FastHash for fasthash::metro::crc::Hash128_1

Source§

impl FastHash for fasthash::metro::crc::Hash128_2

Source§

impl FastHash for fasthash::metro::Hash64_1

Source§

impl FastHash for fasthash::metro::Hash64_2

Source§

impl FastHash for fasthash::metro::Hash128_1

Source§

impl FastHash for fasthash::metro::Hash128_2

Source§

impl FastHash for fasthash::mum::Hash64

Source§

impl FastHash for fasthash::murmur2::Hash32

Source§

impl FastHash for Hash32A

Source§

impl FastHash for fasthash::murmur2::Hash32Aligned

Source§

impl FastHash for Hash32Neutral

Source§

impl FastHash for Hash64_x64

Source§

impl FastHash for Hash64_x86

Source§

impl FastHash for fasthash::murmur3::Hash32

Source§

impl FastHash for Hash128_x64

Source§

impl FastHash for Hash128_x86

Source§

impl FastHash for fasthash::murmur::Hash32

Source§

impl FastHash for fasthash::murmur::Hash32Aligned

Source§

impl FastHash for fasthash::sea::Hash64

Source§

impl FastHash for fasthash::spooky::Hash32

Source§

impl FastHash for fasthash::spooky::Hash64

Source§

impl FastHash for fasthash::spooky::Hash128

Source§

impl FastHash for fasthash::t1ha::t1ha0::aes::Hash64

Source§

impl FastHash for fasthash::t1ha::t1ha0::avx2::Hash64

Source§

impl FastHash for fasthash::t1ha::t1ha0::avx::Hash64

Source§

impl FastHash for fasthash::t1ha::t1ha0::Hash64

Source§

impl FastHash for Hash64Be

Source§

impl FastHash for Hash64Le

Source§

impl FastHash for Hash64AtOnce

Source§

impl FastHash for Hash128AtOnce

Source§

impl FastHash for fasthash::xx::Hash32

Source§

impl FastHash for fasthash::xx::Hash64