Crate combid

Source
Expand description

Generates numeric identifiers.

Structs§

Generator
Iterator which will generate combids using a thread-local RNG.
TimeGenerator
Iterator which will generate identifiers based in the current time.

Enums§

IdError

Functions§

gen
Generates a Combid (Combined Identifier), a combination of a timestamp and some random bits. The timestamp ensures they are ordered chronologically, and the random bits ensure that each ID is unique, even if thousands of people are creating IDs at the same time.
gen_timeid
Generates an identifier based in the current time.