Skip to main content

Module ident_hasher

Module ident_hasher 

Source
Expand description

A custom hasher for Ident keys with precomputed hashes.

IdentBuildHasher creates IdentHashers that handle two hash paths:

  • Ident::hash() — writes a precomputed u64 via write_u64
  • str::hash() — writes bytes via write, then computes hash data

Both paths are normalized to the same final state so Equivalent<Ident> for str lookups always match Ident-keyed inserts.

Structs§

IdentBuildHasher
A BuildHasher for Ident-keyed hash maps.
IdentHasher
A Hasher that handles both Ident (precomputed) and str (computed) hash paths.

Functions§

ident_hash
Compute a fast, high-quality hash of identifier bytes.
pack_len_hash
Pack length and hash into a single u64.