slot_generator 0.1.0

Efficiently generate and reclaim slot IDs from a numerical range
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 8.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.44 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Osspial/slot_generator
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Osspial

slot_generator

Crates.io Docs.rs

Efficiently generate and reclaim slot IDs from a numerical range.

The SlotGenerator type works by maintaining a list of unused slot ranges, and pulls the lowest available value from the slot pool whenever the user requests one. Slots can be reclaimed and placed back in the generator pool with the replace_slot methods. It's not a terribly complex implementation, and it shouldn't be used if you need to generate secure IDs, but you don't always need a secure generator and the complexity that comes from that.