This lib is inspired from the Rust implementation of the ulid project which provides Universally Unique Lexicographically Sortable Identifiers.
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());
serde
: Enables serialization and deserialization ofUlys
types viaserde
. ULYSs are serialized using their canonical 26-character representation as defined in the ULID standard. An optionalulys_as_u128
module is provided, which enables serialization through anUlys
's inneru128
primitive type. See the documentation and serde docs for more information.uuid
: Implements infallible conversions between ULYSs and UUIDs from theuuid
crate via thestd::convert::From
trait.