[−][src]Module unique_id::sequence
An implementation that provides monotonically increasing integer values.
While SequenceGenerator
is thread safe, and it's shared implementation assures that IDs are
generated uniquely among threads, it is always initialized to the same value when a process starts.
It provides an implementation of the trait GeneratorFromSeed
that allows a process to initialize
the counter with a specific value.
Example
use unique_id::Generator; use unique_id::sequence::SequenceGenerator; let gen = SequenceGenerator::default(); let id = gen.next_id();
Structs
SequenceGenerator | Generates monotonically increasing |