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

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RowID

A time-based unique ID solution.

Installation

To install this package, run the following command:

cargo add rowid

Quick Start

Create an ID with the following code:

use rowid::base::rowid;

let id: String = rowid();

Or start a customization with the following code:

use rowid::with_config::{RowIDWithConfig, RowIDWithConfigResult};

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

let id: String = rwc.rowid();

License

This project is licensed under the terms of the MIT license.