Module generator

Module generator 

Source

Modules§

thread_localulid and thread-local
Thread-local ULID generation utilities.

Structs§

AtomicSnowflakeGeneratorsnowflake and atomic and target_has_atomic=64
A lock-free Snowflake ID generator suitable for multi-threaded environments.
BasicMonoUlidGeneratorulid and basic
A monotonic ULID-style ID generator suitable for single-threaded environments.
BasicSnowflakeGeneratorsnowflake and basic
A non-concurrent Snowflake ID generator suitable for single-threaded environments.
BasicUlidGeneratorulid and basic
A non-monotonic ULID-style ID generator suitable for multi-threaded environments.
LockMonoUlidGeneratorulid and lock
A lock-based monotonic ULID-style ID generator suitable for multi-threaded environments.
LockSnowflakeGeneratorsnowflake and lock
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.
IdGenStatus
Represents the result of attempting to generate a new Snowflake ID.

Traits§

SnowflakeGeneratorsnowflake
A minimal interface for generating Snowflake IDs
UlidGeneratorulid
A minimal interface for generating Ulid IDs

Type Aliases§

Result
A result type that is infallible by default.