Skip to main content

Module generator

Module generator 

Source

Modules§

thread_localthread-local and ulid
Thread-local ULID generation utilities.

Structs§

AtomicSnowflakeGeneratortarget_has_atomic=64 and atomic and snowflake
A lock-free Snowflake ID generator suitable for multi-threaded environments.
BasicMonoUlidGeneratorbasic and ulid
A monotonic ULID-style ID generator suitable for single-threaded environments.
BasicSnowflakeGeneratorbasic and snowflake
A non-concurrent Snowflake ID generator suitable for single-threaded environments.
BasicUlidGeneratorbasic and ulid
A non-monotonic ULID-style ID generator suitable for multi-threaded environments.
LockMonoUlidGeneratorlock and ulid
A lock-based monotonic ULID-style ID generator suitable for multi-threaded environments.
LockSnowflakeGeneratorlock and snowflake
A lock-based Snowflake ID generator suitable for multi-threaded environments.
Mutexlock and non-parking-lot
A mutual exclusion primitive useful for protecting shared data
MutexGuardlock and non-parking-lot
An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
PoisonErrorlock and non-parking-lot
A type of error which can be returned whenever a lock is acquired.

Enums§

Error
All error variants that ferroid can emit.
Poll
Represents the result of attempting to generate a new ID.

Traits§

SnowflakeGeneratorsnowflake
A minimal interface for generating Snowflake IDs.
UlidGeneratorulid
A minimal interface for generating ULIDs.

Type Aliases§

Result
A result type that is infallible by default.