crux_structs v0.2.3 Crux.Structs.Snowflake.Parts View Source
Custom non discord api struct representing a deconstructed Discord snowflake.
Structure of the Parts
| Field | Bits | Number of Bits | Description |
|---|---|---|---|
| Timestamp | 63 to 22 | 42 bits | Milliseconds since Discord Epoch (1420070400000) |
| Internal Worker ID | 21 to 17 | 5 bits | |
| Internal Process ID | 16 to 12 | 5 bits | |
| Increment | 11 to 0 | 12 bits | For every ID that is generated on that process, this number is incremented |
For more information see Discord Docs.
Link to this section Summary
Types
The parts of a t:Crux.Structs.Snowflake.t/0.
Link to this section Types
Specs
t() :: %Crux.Structs.Snowflake.Parts{
increment: non_neg_integer(),
process_id: non_neg_integer(),
timestamp: non_neg_integer(),
worker_id: non_neg_integer()
}
The parts of a t:Crux.Structs.Snowflake.t/0.