Trait hash32::Hasher

source ·
pub trait Hasher: Hasher {
    // Required method
    fn finish32(&self) -> u32;
}
Expand description

An extension of core::hash::Hasher for hashers which use 32 bits.

For hashers which implement this trait, the standard finish method should just return a zero-extended version of the result of finish32.

§Contract

Implementers of this trait must not perform any 64-bit (or 128-bit) operation while computing the hash.

Required Methods§

source

fn finish32(&self) -> u32

The equivalent of core::hash::Hasher.finish for 32-bit hashers.

This returns the hash directly; finish zero-extends it to 64 bits for compatibility.

Implementors§

source§

impl Hasher for hash32::FnvHasher

source§

impl Hasher for hash32::Murmur3Hasher