idalloc 0.1.1

A library for different methods of allocating unique identifiers efficiently.
Documentation
  • Coverage
  • 100%
    13 out of 13 items documented12 out of 13 items with examples
  • Size
  • Source code size: 19.93 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.6 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • udoprog/idalloc
    4 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • udoprog

idalloc

Documentation Crates Actions Status

A library for different methods of allocating unique identifiers efficiently.

Provided methods:

  • Slab - Allocates id in a slab-like manner, handling automatic reclamation by keeping a record of which identifier slot to allocate next.

Examples

let mut alloc = idalloc::Slab::<u32>::new();
assert_eq!(0u32, alloc.next());
assert_eq!(1u32, alloc.next());
alloc.free(0u32);