Ulid.fromParts

UlidResult fromParts(ulong timestampMs, const ubyte[RANDOM_LENGTH] randomness) static @safe pure nothrow @nogc

Builds a ULID from a timestamp and an explicit random component.

Parameters

timestampMsmilliseconds since the Unix epoch, at most MAX_TIMESTAMP.
randomnessthe 80-bit random component, most significant byte first; it becomes bytes 6 to 15 of the ULID.

Returns

the ULID, or UlidError.TIMESTAMP_OVERFLOW when timestampMs

does not fit in 48 bits.