CreateHashSet
Creates an empty hash set using built-in logical key hashing.
Module std.collections
import std.collections;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
CreateHashSet
pub fn CreateHashSet<K>() -> HashSet<K>
where K: BuiltinHashKey, MovableCreates an empty hash set using built-in logical key hashing.
Construction allocates nothing. The returned owner allocates on fallible reserve/insertion; borrowed text keys still require their backing owner to outlive storage. Custom key types must supply an explicit policy through the HashSet constructor. Floating keys use canonical signed-zero/NaN equality. K: Supported built-in key representation, movable into storage. Return: Empty owning table with the default allocator and safe hash functions.
CreateHashSet
pub fn CreateHashSet<K, A>(mut AllocatorValue: A) -> HashSet<K, HashPolicy<K>, A>
where K: BuiltinHashKey, Movable where A: Allocator, Defaultable, MovableCreates an empty default-hash set with a transferred allocator.
Both table arrays remain owned by this allocator; failed insertion retains the input key. Construction allocates nothing and retains no external borrow. K: Supported built-in movable key representation. A: Movable Defaultable allocator type owning future table allocations. AllocatorValue: Allocator transferred into the returned table. Return: Empty table owning its allocator and default safe hash/equality policy.