Expand description
§kael_collections
Fast, deterministic collection aliases used throughout Kael. The crate provides
Fx-hashed versions of HashMap, HashSet, IndexMap, and IndexSet, alongside
the standard collection re-exports expected by framework internals.
Use these aliases for trusted, in-process keys where predictable hashing and low
overhead matter. Use the standard library’s randomized HashMap and HashSet
for attacker-controlled keys that require hash-flood resistance.
use kael_collections::{HashMap, IndexMap};
let mut lookup = HashMap::default();
lookup.insert("workspace", 1);
let mut ordered = IndexMap::default();
ordered.insert("first", 1);
ordered.insert("second", 2);
assert_eq!(lookup["workspace"], 1);
assert_eq!(ordered.keys().copied().collect::<Vec<_>>(), ["first", "second"]);See the API documentation for the complete set of aliases and re-exports, and the Kael guide for framework-level usage.
§License
Licensed under the Apache License, Version 2.0.
Modules§
- binary_
heap - A priority queue implemented with a binary heap.
- btree_
map - An ordered map based on a B-Tree.
- btree_
set - An ordered set based on a B-Tree.
- hash_
map - A hash map implemented with quadratic probing and SIMD lookup.
- hash_
set - A hash set implemented as a
HashMapwhere the value is(). - linked_
list - A doubly-linked list with owned nodes.
- vec_
deque - A double-ended queue (deque) implemented with a growable ring buffer.
Structs§
- BTree
Map - An ordered map based on a B-Tree.
- BTree
Set - An ordered set based on a B-Tree.
- Binary
Heap - A priority queue implemented with a binary heap.
- FxHasher
- A speedy hash algorithm for use within rustc. The hashmap in liballoc by default uses SipHash which isn’t quite as speedy as we want. In the compiler we’re not really worried about DOS attempts, so we use a fast non-cryptographic hash.
- Linked
List - A doubly-linked list with owned nodes.
- TryReserve
Error - The error type for
try_reservemethods. - VecDeque
- A double-ended queue implemented with a growable ring buffer.
Enums§
- Bound
- An endpoint of a range of keys.
- TryReserve
Error Kind Experimental - Details of the allocation that caused a
TryReserveError
Traits§
- Equivalent
- Key equivalence trait.
Type Aliases§
- FxHash
Map - Type alias for a hash map that uses the Fx hashing algorithm.
- FxHash
Set - Type alias for a hash set that uses the Fx hashing algorithm.
- HashMap
- A hash map using the fast, deterministic Fx hasher.
- HashSet
- A hash set using the fast, deterministic Fx hasher.
- Index
Map - An insertion-ordered map using the fast, deterministic Fx hasher.
- Index
Set - An insertion-ordered set using the fast, deterministic Fx hasher.