1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! # id-forge
//!
//! Typed, high-performance unique ID generation for Rust. Every common
//! ID scheme in one zero-dependency library:
//!
//! - **[`uuid`]**: UUID v4 (random) and v7 (time-ordered)
//! - **[`ulid`]**: Universally Unique Lexicographically Sortable ID
//! - **[`snowflake`]**: Twitter Snowflake-style 64-bit IDs (epoch + worker + sequence)
//! - **[`nanoid`]**: URL-safe random strings of any length
//!
//! ## Quick example
//!
//! ```
//! use id_forge::uuid::Uuid;
//!
//! let id = Uuid::v4();
//! println!("{id}");
//! ```
//!
//! ## Why this library exists
//!
//! Today's options are fragmented: `uuid` for UUIDs, `ulid` for ULIDs,
//! `snowflake-rs` for snowflakes, `nanoid` for NanoIDs. Each has its
//! own quirks, MSRV, and dependencies. `id-forge` is one zero-dep
//! crate at MSRV 1.75 covering every scheme.
//!
//! ## Status
//!
//! `v0.9.3` closes the 0.9.x algorithm cycle: NanoID now uses the
//! shared xoshiro256\*\* generator with bias-free power-of-two
//! rejection sampling and grows a `try_custom` strict entry point
//! plus an `AlphabetError` type. UUID v4/v7 (`0.9.0`), ULID (`0.9.1`),
//! and Snowflake (`0.9.2`) are unchanged. The next release is the
//! 1.0.0 API freeze.