Skip to main content

Module hash

Module hash 

Source
Expand description

Workspace-wide hasher selection.

Default: hashbrown’s hashbrown::DefaultHashBuilder (FoldHash on hashbrown 0.15+). The ahash and gxhash features each swap in a different hasher.

Cargo unifies features across a dependency graph, so two unrelated dependants asking for different hashers must not break the build: when both features end up enabled, gxhash wins.

Enabling ahash also adds no new dependency: lasso, which backs the string interner, enables its ahasher feature unconditionally, so ahash is compiled either way.

Type Aliases§

DefaultBuildHashergxhash
Hasher used by the collections of this crate.
HashMap
Hash map using DefaultBuildHasher.
HashSet
Hash set using DefaultBuildHasher.
IndexMap
Insertion-ordered map using DefaultBuildHasher.
IndexSet
Insertion-ordered set using DefaultBuildHasher.