slot_generator

Crates.ioslot_generator
lib.rsslot_generator
version0.1.0
sourcesrc
created_at2020-02-23 16:52:01.474212
updated_at2020-02-23 16:52:01.474212
descriptionEfficiently generate and reclaim slot IDs from a numerical range
homepage
repositoryhttps://github.com/Osspial/slot_generator
max_upload_size
id211801
size8,125
(Osspial)

documentation

README

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.

Commit count: 4

cargo fmt