rasendubi / cuid-rust

Rust implemention of CUID unique IDs

Home Page:https://crates.io/crates/cuid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cuid-rust

Travis Build Status Crates.io

Cuids are "Collision-resistant ids optimized for horizontal scaling and binary search lookup performance."

This is a rust implementation of the CUID library, the original JavaScript implementation of which may be found here

Installation

In cargo.toml

cuid = "1.0.0"

Usage

use cuid;

fn main() -> () {
    println!("{}", cuid.cuid().unwrap());
    println!("{}", cuid.slug().unwrap());
}

This package also provides a binary:

> cargo run cuid
cq64d5t05g4lx7twdb3t

About

Rust implemention of CUID unique IDs

https://crates.io/crates/cuid

License:MIT License


Languages

Language:Rust 100.0%