1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
//! High-performance collections backed by explicit allocators.
//!
//! Unlike [`std::collections`], every type in this module:
//!
//! 1. **Never uses a global allocator.** Each collection accepts an
//! [`Allocator`] reference at construction time and routes all allocations
//! through it.
//! 2. **Provides SIMD-accelerated operations** (fill, search, copy) where
//! applicable via the internal `simd` module.
//! 3. **Decouples data from logic** via *context traits*: hashing and ordering
//! are provided through [`HashContext`] and [`OrdContext`] rather than via
//! `Hash` / `Ord` bounds. This allows domain-specific algorithms without
//! wrapper types.
//!
//! ## Collection Overview
//!
//! | Type | Description |
//! |------|-------------|
//! | [`ExVec<T>`] | Growable contiguous array |
//! | [`ExBox<T>`] | Single heap-allocated value |
//! | [`ExString`] | Growable UTF-8 string |
//! | [`ExHashMap<K, V, C>`] | Swiss-table open-addressing hash map |
//! | [`ExPriorityQueue<T, C>`] | Binary-heap priority queue |
//! | [`ExBoundedArray<T, N>`] | Fixed-capacity stack-allocated array |
//!
//! [`Allocator`]: crate::alloc::allocator::Allocator
pub use ExVec;
pub use ExBox;
pub use ExString;
pub use ExHashMap;
pub use ExPriorityQueue;
pub use ExBoundedArray;
/// Provides hashing and equality for keys of type `K`.
///
/// Implementors replace the standard `Hash` + `Eq` trait combination, allowing
/// custom hash functions without needing newtype wrappers.
///
/// # Contract
///
/// * If `eq(a, b)` returns `true`, then `hash(a) == hash(b)` must also hold.
/// * `eq` must be an equivalence relation (reflexive, symmetric, transitive).
/// Provides a total ordering for elements of type `T`.
///
/// Implementors replace the standard `Ord` / `PartialOrd` traits, enabling
/// context-dependent orderings (e.g. reverse order, key-extracted order)
/// without newtype wrappers.
///
/// # Contract
///
/// `less` must define a strict weak ordering:
/// * Irreflexivity: `less(a, a)` is `false`.
/// * Asymmetry: if `less(a, b)` then `!less(b, a)`.
/// * Transitivity: if `less(a, b)` and `less(b, c)` then `less(a, c)`.
/// [`HashContext<u64>`] using FNV-1a hashing.
;
/// [`HashContext<usize>`] that delegates to [`U64HashCtx`].
;
/// [`OrdContext<usize>`] that orders elements from smallest to largest
/// (min-heap).
;