A library for different methods of allocating unique identifiers efficiently.
- Slab - Allocates id in a slab-like manner, handling automatic reclamation by keeping a record of which identifier slot to allocate next.
let mut alloc = idalloc::Slab::<u32>::new(); assert_eq!(0u32, alloc.next()); assert_eq!(1u32, alloc.next()); alloc.free(0u32);
A slab-based id allocator which can deal with automatic reclamation as ids are freed.
A type that can be used an allocator index.