Skip to main content

modo/id/
mod.rs

1//! # modo::id
2//!
3//! Unique ID generation utilities.
4//!
5//! Provides:
6//!
7//! - [`ulid`] — 26-character spec-compliant ULID (Crockford base32, uppercase),
8//!   suitable for primary keys and globally unique identifiers.
9//! - [`short`] — 13-character base36 ID (lowercase), suitable for user-visible
10//!   codes, slugs, and short URLs.
11//!
12//! Both functions are always available and require no feature flags.
13//!
14//! ## Quick start
15//!
16//! ```rust
17//! use modo::id::{ulid, short};
18//!
19//! let pk = ulid();        // e.g. "01H5KEBZXQJ3A1BCDTG9V0KWRP"
20//! let code = short();     // e.g. "0j3k7m9q2x1nz"
21//! ```
22mod short;
23mod ulid;
24
25pub use short::short;
26pub use ulid::ulid;