Trait djb_hash::HasherU32[][src]

pub trait HasherU32: Hasher {
    fn finish_u32(&self) -> u32;
}

This trait is used by 32 bit hashes.

Required Methods

Returns a 32 bit hash instead of the normal 64 bit one.

Rust has settled on using 64 bit hashes by default but in many cases for smaller HashMaps 32 bit hashes are enough. For those cases this function saves convert to, and then back from 64 bit, where the internal hash uses 32 bits and only 32 bits hash are needed.

Implementors