yeast-rs

Crates.ioyeast-rs
lib.rsyeast-rs
version0.3.0
sourcesrc
created_at2021-07-20 23:24:21.626856
updated_at2021-07-20 23:24:21.626856
descriptionTiny but linear growing unique id generator.
homepage
repositoryhttps://github.com/CfirTsabari/yeast-rs
max_upload_size
id425324
size58,402
(CfirTsabari)

documentation

https://docs.rs/yeast-rs

README

yeast-rs

Tiny but linear growing unique id generator.
Rust implementation of the JS package - yeast
Gitpod ready-to-code Rust

Usage

Install

[dependencies]
yeast-rs = "0.1.0"

Simple

This crate has one function yeast which return Yeast a URL-safe unique id.

use yeast_rs::yeast;

fn main() {
   let id = yeast().to_string(); //=> "NgqS4Rd"
}

async support

Currently, we support tokio and async-std

[dependencies]
yeast-rs = {version ="0.1.0",features=["async-std-runtime"]}
use yeast_rs::async_std::yeast;
async fn func(){
   let id = yeast().await.to_string(); //=> "NgqS4Rd"
}
Commit count: 29

cargo fmt