Expand description
Allocates integer ids which implement intid::IntegerIdCounter.
Use IdAllocator if you want to be able to free existing ids for reuse.
This will minimize the integer value of the keys, reducing memory needed for lookup tables.
Use UniqueIdAllocator or UniqueIdAllocatorAtomic if you don’t care about reusing existing keys.
These are more efficient and never require any allocation.
Structs§
- IdAllocator
- A type that allocates integer ids, with the ability to free unused ids back to storage.
- IdExhausted
Error - Indicates that available ids have been exhausted, and can no longer be allocated.
- Unique
IdAllocator - Allocates unique integer ids.
- Unique
IdAllocator Atomic - Allocates unique integer ids atomically, in a way safe to use from multiple threads.