Expand description

idgenerator

A powerful unique id generator.

Out-of-the-box instances

This lib has provided two out-of-the-box implementations:

Self-implement instance

This lib wraps the snowflake algorithm inside the CoreIdGenerator struct. You can wrap this struct inside your own instance of unique id generator.

Others

  • IdGeneratorOptions: options for id generator.
  • OptionError: errors for setting options.

Re-exports

pub use error::OptionError;
pub use generator::CoreIdGenerator;
pub use instance::IdInstance;
pub use instance::IdVecInstance;
pub use options::IdGeneratorOptions;

Modules

Generator

Instance

IdGeneratorOptions