ulys

Crates.ioulys
lib.rsulys
version31.0.0
sourcesrc
created_at2024-07-24 12:50:00.768601
updated_at2024-08-07 07:52:10.900628
descriptiona Universally Unique Lexicographically Sortable Identifier implementation, with a checksum
homepage
repositoryhttps://github.com/ystorian/ulys
max_upload_size
id1313960
size18,075
publysh (github:ystorian:publysh)

documentation

README

ulys

Build Status Crates.io docs.rs

This lib is inspired from the Rust implementation of the ulid project which provides Universally Unique Lexicographically Sortable Identifiers.

Quickstart

use ulys::Ulys;

// Generate a ulys
let ulys = Ulys::new();

// Generate a string for a ulys
let s = ulys.to_string();

// Create from a String
let res = Ulys::from_string(&s);

assert_eq!(ulys, res.unwrap());

Crate Features

  • serde: Enables serialization and deserialization of Ulys types via serde. ULYSs are serialized using their canonical 26-character representation as defined in the ULID standard. An optional ulys_as_u128 module is provided, which enables serialization through an Ulys's inner u128 primitive type. See the documentation and serde docs for more information.
  • uuid: Implements infallible conversions between ULYSs and UUIDs from the uuid crate via the std::convert::From trait.
Commit count: 0

cargo fmt