Skip to main content

new_id

Function new_id 

Source
pub fn new_id() -> String
Expand description

A time-sortable id: 13-digit zero-padded epoch-millis, a dash, then 16 hex.

Lexical order ≈ chronological order, which is all the reader needs. Mirrors the uuid-shaped minting in crate::snowflake::client without adding a crate.