Skip to main content

Module collections

Module collections 

Source
Expand description

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

TypeDescription
ExVec<T>Growable contiguous array
ExBox<T>Single heap-allocated value
ExStringGrowable 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

Re-exports§

pub use vec::ExVec;
pub use boxed::ExBox;
pub use string::ExString;
pub use hash_map::ExHashMap;
pub use priority_queue::ExPriorityQueue;
pub use bounded_array::ExBoundedArray;

Modules§

bounded_array
Fixed-capacity, stack-allocated array.
boxed
Heap-allocated single value with an explicit allocator.
hash_map
Swiss-table inspired open-addressing hash map.
priority_queue
Heap-based priority queue with an explicit allocator.
string
Growable UTF-8 string with an explicit allocator.
vec
Growable contiguous array with an explicit allocator.

Structs§

U64HashCtx
HashContext<u64> using FNV-1a hashing.
UsizeHashCtx
HashContext<usize> that delegates to U64HashCtx.
UsizeMinCtx
OrdContext<usize> that orders elements from smallest to largest (min-heap).

Traits§

HashContext
Provides hashing and equality for keys of type K.
OrdContext
Provides a total ordering for elements of type T.