Type Definition bevy_utils::StableHashMap[][src]

pub type StableHashMap<K, V> = HashMap<K, V, FixedState>;
Expand description

A stable std hash map implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.

Unlike HashMap this has an iteration order that only depends on the order of insertions and deletions and not a random source.

aHash is designed for performance and is NOT cryptographically secure.

Trait Implementations

Creates an empty StableHashMap with the specified capacity with aHash.

The hash map will be able to hold at least capacity elements without reallocating. If capacity is 0, the hash map will not allocate.

Examples
use bevy_utils::{StableHashMap, AHashExt};
let mut map: StableHashMap<&str, i32> = StableHashMap::with_capacity(10);
assert!(map.capacity() >= 10);