Timeflake-rs

License

Timeflake is a 128-bit, roughly-ordered, URL-safe UUID. Inspired by Twitter's Snowflake, Instagram's ID and Firebase's PushID.

Port of https://github.com/anthonynsimon/timeflake in pure Rust

Example code

``` use Timeflake;

fn main() { let time = SystemTime::now().durationsince(UNIXEPOCH).unwrap(); println!("{}", Timeflake::random().unwrap()); println!("{}", Timeflake::fromvalues(time, Some(0))); println!("{}", Timeflake::fromvalues(time, None)); } ```