Module id_gen

Source
Expand description

ID generation utilities.

Modules§

internal 🔒

Structs§

AtomicGen
Manages the allocation of unique IDs.
Gen
Manages the allocation of unique IDs.
IdAllocator
Manages allocation of numeric IDs.
IdAllocatorInnerBitSet
IdAllocator using a HiBitSet.

Enums§

IdHandle
A clone-able owned reference to an ID.

Constants§

MAX_ORG_ID
Max (inclusive) connection id that can be produced.
ORG_ID_OFFSET
Number of bits the org id is offset into a connection id.

Traits§

IdAllocatorInner
Common trait for id allocators.
IdGenerator
IdAllocator common traits.

Functions§

conn_id_org_uuid
Returns the portion of the org’s UUID present in connection id.
org_id_conn_bits
Extracts the lower 12 bits from an org id. These are later used as the [31, 20] bits of a connection id to help route cancellation requests.
temp_id
Generate a random temporary ID.

Type Aliases§

AtomicIdGen
A generator of u64-bit IDs.
IdGen
A generator of u64-bit IDs.