Skip to content

Efficiently generate and reclaim slot IDs from a numerical range

License

Notifications You must be signed in to change notification settings

Osspial/slot_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Efficiently generate and reclaim slot IDs from a numerical range

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages