Skip to main content

Crate snowid

Crate snowid 

Source
Expand description

ยงSnowID

A Rust implementation of a Snowflake-like ID generator with 42-bit timestamp.

Generate 64-bit unique identifiers that are:

  • โšก๏ธ Fast (~325ns per ID)
  • ๐Ÿ“ˆ Time-sorted
  • ๐Ÿ”„ Monotonic
  • ๐Ÿ”’ Thread-safe
  • ๐ŸŒ Distributed-ready

Modulesยง

base62
Base62 encoding and decoding for SnowID values

Structsยง

SnowID
Main ID generator with cache-line alignment
SnowIDConfig
Configuration for SnowID generator Copy-optimized with const-evaluable fields
SnowIDExtractor
SnowID component extractor
TryGenerateError
Error returned by non-blocking generation APIs when the current millisecond is exhausted.

Enumsยง

SnowIDError
Represents errors that can occur during SnowID operations