ulid 0.3.0

a Universally Unique Lexicographically Sortable Identifier implementation
Documentation

ulid-rs

Build Status Crates.io docs.rs

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

Quickstart

// Generate a ulid
let ulid = Ulid::new();

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

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

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

Benchmark

Benchmarks were run on my laptop. Run them yourself with cargo bench.

test bench_from_string ... bench:          40 ns/iter (+/- 4)
test bench_from_time   ... bench:          24 ns/iter (+/- 2)
test bench_new         ... bench:          75 ns/iter (+/- 9)
test bench_to_string   ... bench:          53 ns/iter (+/- 4)