Skip to main content

Module collections

Module collections 

Source
Expand description

Allocator-aware collections.

  • HashMap<K, V, A> — type alias for hashbrown::HashMap<K, V, DefaultHashBuilder, A>. Unordered iteration; allocator-aware on stable via hashbrown’s allocator-api2 feature.

No allocator-aware BTreeMap: there’s no stable impl, and no current consumer parameterises BTreeMap by allocator. Callers that want ordered iteration can sort a HashMap iterator at consumption time.

Structs§

DefaultHashBuilder
Default hash builder for the S type parameter of HashMap and HashSet.

Type Aliases§

HashMap
SwissTable hash map. Re-export of hashbrown::HashMap<K, V, S, A> with the upstream parameter order preserved: K, V, S, A. The S slot lets callers pin a deterministic hasher (e.g. foldhash::fast::FixedState) which the shared-memory state cache requires; the heap-backed default DefaultHashBuilder is foldhash::fast::RandomState.