#uuid #better #ulid

uwuid

Like UUIDs or ULIDs, but better

4 releases (2 breaking)

0.3.1 Jul 22, 2022
0.3.0 Jul 22, 2022
0.2.0 Jul 22, 2022
0.1.0 Jul 22, 2022

#19 in #ulid

MIT/Apache

7KB
53 lines

Uwuid

standard-readme compliant Crates.io Crates.io Crates.io

Like UUIDs or ULIDs, but better

Install

Add the following to your Cargo.toml:

uwuid = "0.3.1"

Usage

// Create a uwuid:
let id = uwuid::UwuId::new();
// Convert it to a string:
// 😳d😳,,afa,,d🤗;sa😳sdk😍ghf,ldjddlsa
let foo = format!("{}", id);
// Parse a uwuid from a string:
let bar: uwuid::UwuId = foo.parse().unwrap();
// You can get the creation time of a uwuid, too!
let time = id.time();

License

MIT OR Apache-2.0 © bs2k

Dependencies

~1MB
~18K SLoC