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

FieldBitsNumber of BitsDescription
Timestamp63 to 2242 bitsMilliseconds since Discord Epoch (1420070400000)
Internal Worker ID21 to 175 bits
Internal Process ID16 to 125 bits
Increment11 to 012 bitsFor every ID that is generated on that process, this number is incremented

For more information see Discord Docs.

Link to this section Summary

Link to this section Types

Link to this type

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()
}

The parts of a Crux.Structs.Snowflake.t/0.