Type Definition identity_hash::IntMap

source ·
pub type IntMap<K, V> = HashMap<K, V, BuildIdentityHasher<K>>;
Expand description

A HashMap with an integer domain, using IdentityHasher to perform no hashing at all.

Examples

See IdentityHashable for use with custom types.

use identity_hash::IntMap;

let mut m: IntMap<u32, bool> = IntMap::default();

m.insert(0, false);
m.insert(1, true);

assert!(m.contains_key(&0));
assert!(m.contains_key(&1));