Type Definition bevy_utils::StableHashSet[][src]

pub type StableHashSet<K> = HashSet<K, FixedState>;
Expand description

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

Unlike HashSet 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 StableHashSet with the specified capacity with aHash.

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

Examples
use bevy_utils::{StableHashSet, AHashExt};
let set: StableHashSet<i32> = StableHashSet::with_capacity(10);
assert!(set.capacity() >= 10);