Expand description
Slab storage traits for instance-based (non-ZST) slabs.
Single trait hierarchy: SlabStore provides allocation and deallocation.
BoundedStore extends it with fallible allocation for callers who want
graceful error handling.
§Allocation and OOM
SlabStore::alloc always returns a valid slot. For unbounded slabs this
is guaranteed by growth. For bounded slabs, exceeding capacity panics.
This is a deliberate design choice: bounded capacity is a deployment constraint, not a runtime negotiation. If you hit the limit, your capacity planning is wrong and the system should fail loudly — the same way a process panics on OOM. Silently dropping timers or events is worse than crashing.
Use BoundedStore::try_alloc if you need graceful error handling at
specific call sites.
Structs§
- Bounded
Slab - Fixed-capacity slab allocator.
- Unbounded
Slab - Growable slab allocator.
Traits§
- Bounded
Store - Bounded (fixed-capacity) storage — provides fallible allocation.
- Slab
Store - Base trait for slab storage — allocation, deallocation, and value extraction.