UlidError.CLOCK_FAILURE,
UlidError.TIMESTAMP_OVERFLOW, UlidError.RANDOM_OVERFLOW or UlidError.ENTROPY_FAILURE.
Generates the next ULID for the current time.
UlidError.CLOCK_FAILURE,
UlidError.TIMESTAMP_OVERFLOW, UlidError.RANDOM_OVERFLOW or UlidError.ENTROPY_FAILURE.
Generates the next ULID for a given time. Fresh randomness comes from the operating system, and only when the timestamp moves past the last one.
timestampMs | milliseconds since the Unix epoch, at most Ulid.MAX_TIMESTAMP. |
UlidError.TIMESTAMP_OVERFLOW,
UlidError.RANDOM_OVERFLOW or UlidError.ENTROPY_FAILURE.
UlidResult next(ulong timestampMs, const ubyte[Ulid.RANDOM_LENGTH] randomness) @safe pure nothrow @nogcGenerates the next ULID for a given time with caller-supplied randomness, for a custom random source or for reproducible sequences.
timestampMs | milliseconds since the Unix epoch, at most Ulid.MAX_TIMESTAMP. |
randomness | the random component to use if the timestamp moves past the last one; ignored otherwise. |
UlidError.TIMESTAMP_OVERFLOW or
UlidError.RANDOM_OVERFLOW.