Skip to content

A time-based unique ID solution

License

Notifications You must be signed in to change notification settings

alpheustangs/rowid.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RowID

A time-based unique ID solution.

Installation

To install RowID, run the following command:

cargo add rowid

Quick Start

You may create a RowID with the following code:

use rowid::rowid;

let id: String = rowid();

Or customize the RowID with the following code:

use rowid::{RowIDWithConfig, RowIDWithConfigResult};

let rwc: RowIDWithConfigResult = RowIDWithConfig::new()
    .char_list("0123456789ABCDEFGHJKMNPQRSTVWXYZ".to_string())
    .randomness_length(22)
    .done()
    .unwrap();

let id: String = rwc.rowid();

License

This project is MIT licensed, you can find the license file here.