atomic-snowflake 11.1.0

Zero-dependency lock-free monotonic 64-bit Snowflake ID, 128-bit ULID, and RFC 9562 UUIDv7 generators with stack-buffered Crockford Base32 and hyphenated hex codecs.
Documentation
1
2
3
4
5
6
7
8
/// Exact ASCII byte length of a hyphenated canonical UUID string.
pub const UUID_STR_LEN: usize = 36;

pub(crate) const HEX_LOWER: &[u8; 16] = b"0123456789abcdef";
pub(crate) const UUID_V7_VERSION_NIBBLE: u64 = 0x7000;
pub(crate) const UUID_V7_SEQ_MASK: u64 = 0x0fff;
pub(crate) const UUID_VARIANT_RFC4122_HI: u64 = 0x8000_0000_0000_0000;
pub(crate) const UUID_RAND_B_MASK: u64 = 0x3fff_ffff_ffff_ffff;