Crux v2020-03-17 17:55:51Z 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 Crux.Structs.Snowflake.t/0
.
Link to this section Types
Link to this type
t()
View Source
(since 0.2.1)
t()
View Source
(since 0.2.1)
t() :: %Crux.Structs.Snowflake.Parts{
increment: non_neg_integer(),
process_id: non_neg_integer(),
timestamp: non_neg_integer(),
worker_id: non_neg_integer()
}
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 Crux.Structs.Snowflake.t/0
.