sequential_gen 0.1.2

A simple sequential generator.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub(crate) mod simple;
#[cfg(not(feature = "no_std"))]
pub(crate) mod unix_epoch;
#[cfg(feature = "uuid")]
pub(crate) mod uuid;

/// A trait for generating unique IDs.
pub trait Generator<T> {
    /// Generates a new unique ID.
    fn generate(&self) -> T;

    fn with_offset(&self, offset: T) -> T;
}