| Crates.io | xid |
| lib.rs | xid |
| version | 1.1.1 |
| created_at | 2020-12-13 00:52:32.026911+00 |
| updated_at | 2024-04-23 19:03:45.811312+00 |
| description | Globally unique sortable id generator. A Rust port of https://github.com/rs/xid. |
| homepage | https://github.com/kazk/xid-rs |
| repository | https://github.com/kazk/xid-rs |
| max_upload_size | |
| id | 322289 |
| size | 42,496 |
Globally unique sortable id generator. A Rust port of https://github.com/rs/xid.
The binary representation is compatible with the Mongo DB 12-byte ObjectId. The value consists of:
The string representation is 20 bytes, using a base32 hex variant with characters [0-9a-v]
to retain the sortable property of the id.
See the original xid project for more details.
println!("{}", xid::new()); //=> bva9lbqn1bt68k8mj62g
cargo run --example gen: Generate xid