Crate spaceflake

source ·

Structs§

  • Settings to bulk generate Spaceflakes easily.
  • Settings to generate Spaceflakes normally.
  • A node holds multiple Worker structures and has a, ideally, unique ID given.
  • A Spaceflake is the internal name for a Snowflake ID.
  • A worker is the a structure that is responsible to generate the Spaceflake.

Constants§

  • The default epoch used with milliseconds, which is the 1st of January 2015 at 12:00:00 AM GMT.

Functions§

  • Generate an amount of Spaceflakes for the given settings.
  • Decompose a Spaceflake ID, and get a key-value hashmap with each part of a Spaceflake.
  • Decompose a Spaceflake ID, and get a key-value hashmap with each part of a Spaceflake in binary.
  • Generate a Spaceflake for the given settings.
  • Generate a Spaceflake for the given settings at a specific time.
  • Parse the node ID of a Spaceflake ID.
  • Parse the sequence of a Spaceflake ID.
  • Parse the time of a Spaceflake ID.
  • Parse the worker ID of a Spaceflake ID.