1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! 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](crate::intern), enables its `ahasher` feature
//! unconditionally, so `ahash` is compiled either way.
/// Hasher used by the collections of this crate.
pub type DefaultBuildHasher = GxBuildHasher;
/// Hasher used by the collections of this crate.
pub type DefaultBuildHasher = RandomState;
/// Hasher used by the collections of this crate.
pub type DefaultBuildHasher = DefaultHashBuilder;
/// Hash map using [`DefaultBuildHasher`].
pub type HashMap<K, V, S = DefaultBuildHasher> = HashMap;
/// Hash set using [`DefaultBuildHasher`].
pub type HashSet<T, S = DefaultBuildHasher> = HashSet;
/// Insertion-ordered map using [`DefaultBuildHasher`].
pub type IndexMap<K, V, S = DefaultBuildHasher> = IndexMap;
/// Insertion-ordered set using [`DefaultBuildHasher`].
pub type IndexSet<T, S = DefaultBuildHasher> = IndexSet;