unique_64

Crates.iounique_64
lib.rsunique_64
version1.0.2
sourcesrc
created_at2024-02-05 23:47:22.504058
updated_at2024-02-05 23:55:08.104991
descriptionA handy struct for dispatching out unique u64s as IDs.
homepage
repository
max_upload_size
id1128098
size33,102
(jordan4ibanez)

documentation

README

Unique64

A handy struct for dispatching out unique u64s as IDs.

Please see the generated docs for how to use. It's pretty simple.

It also doesn't hold your hand. You do whatever you want with it.

But to show you without any context:

fn main() {
  let mut dispatcher = Unique64::new();

  // 0
  let x = dispatcher.get_next();

  // 1
  let y = dispatcher.get_next();

  // 0 is free again.
  dispatcher.remove(x);

  // 0
  let z = dispatcher.get_next();
}

Commit count: 0

cargo fmt