fedimovies/mitra-utils/src/id.rs
2023-02-18 23:12:36 +00:00

8 lines
164 B
Rust

use ulid::Ulid;
use uuid::Uuid;
/// Produces new lexicographically sortable ID
pub fn generate_ulid() -> Uuid {
let ulid = Ulid::new();
Uuid::from(ulid)
}