Crate intid_allocator

Crate intid_allocator 

Source
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.
IdExhaustedError
Indicates that available ids have been exhausted, and can no longer be allocated.
UniqueIdAllocator
Allocates unique integer ids.
UniqueIdAllocatorAtomic
Allocates unique integer ids atomically, in a way safe to use from multiple threads.