solar_data_structures/
map.rs

1//! Map types.
2
3use indexmap::{IndexMap, IndexSet};
4use std::collections::{HashMap, HashSet};
5
6pub use rustc_hash::{self, FxBuildHasher, FxHasher};
7
8/// [`HashMap`] entry type.
9pub type StdEntry<'a, K, V> = std::collections::hash_map::Entry<'a, K, V>;
10/// [`IndexMap`] entry type.
11pub type IndexEntry<'a, K, V> = indexmap::map::Entry<'a, K, V>;
12
13/// A [`HashMap`] using [`FxHasher`] as its hasher.
14pub type FxHashMap<K, V> = HashMap<K, V, FxBuildHasher>;
15/// A [`HashSet`] using [`FxHasher`] as its hasher.
16pub type FxHashSet<V> = HashSet<V, FxBuildHasher>;
17/// An [`IndexMap`] using [`FxHasher`] as its hasher.
18pub type FxIndexMap<K, V> = IndexMap<K, V, FxBuildHasher>;
19/// An [`IndexSet`] using [`FxHasher`] as its hasher.
20pub type FxIndexSet<V> = IndexSet<V, FxBuildHasher>;