Skip to main content

Module id

Module id 

Source
Expand description

UUID and token generation helpers.

The module provides plain random tokens as well as retry helpers for business-unique UUIDs. Callers remain responsible for enforcing uniqueness at the database layer, but the helpers centralize collision retry loops and error messages.

Enums§

UniqueUuidAttempt
Result of attempting to reserve or accept a generated UUID.

Constants§

UNIQUE_UUID_MAX_ATTEMPTS
Maximum number of UUID candidates generated by unique UUID helpers.

Functions§

new_best_effort_uuid
Generates a business UUID and filters occupied candidates through caller-provided lookup.
new_runtime_id
Generates an ephemeral runtime instance identifier.
new_short_token
Generates a short 32-character hex token.
new_uuid
Generates a UUID v4 string.
with_unique_uuid
Runs an operation with a business-unique UUID and caller-owned error type.