ulid-generator-rs

Crates.ioulid-generator-rs
lib.rsulid-generator-rs
version
sourcesrc
created_at2021-01-01 06:33:48.277583
updated_at2024-10-24 00:10:35.615859
descriptionA Rust crate for generating ULIDs
homepage
repositoryhttps://github.com/j5ik2o/ulid-generator-rs
max_upload_size
id330009
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Junichi Kato (j5ik2o)

documentation

README

ulid-generator-rs

A Rust crate for generating ULIDs.

Workflow Status crates.io docs.rs dependency status tokei

Install to Cargo.toml

Add this to your Cargo.toml:

[dependencies]
ulid-generator-rs = "<<version>>"

About ULID

ULID is Universally Unique Lexicographically Sortable Identifier.

For more information, please check the following specifications.

Usage

use ulid_generator_rs::{ULIDGenerator, ULID};

let mut generator: ULIDGenerator = ULIDGenerator::new();
let ulid: ULID = generator.generate().unwrap();
let str: String = ulid.to_string();
println!("{}", str); // "01ETGRM6448X1HM0PYWG2KT648"

Alternative crates

Benchmarks

gen_ulid_and_to_string/j5ik2o/ulid-generator-rs/gen_to_str/0
time:   [117.15 ns 117.26 ns 117.39 ns]
change: [-1.7662% -0.9620% -0.3349%] (p = 0.00 < 0.05)
Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe

gen_ulid_and_to_string/dylanhart/ulid-rs/gen_to_str/0
time:   [115.63 ns 115.81 ns 116.04 ns]
change: [-1.0856% -0.8741% -0.6850%] (p = 0.00 < 0.05)
Change within noise threshold.
Found 4 outliers among 100 measurements (4.00%)
2 (2.00%) high mild
2 (2.00%) high severe

gen_ulid_and_to_string/huxi/rusty_ulid/gen_to_str/0
time:   [126.32 ns 126.46 ns 126.60 ns]
change: [-0.4696% -0.3016% -0.1476%] (p = 0.00 < 0.05)
Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild

gen_ulid_and_to_string/suyash/ulid-rs/gen_to_str/0
time:   [157.22 ns 157.35 ns 157.49 ns]
change: [-1.6453% -1.4630% -1.2639%] (p = 0.00 < 0.05)
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
3 (3.00%) high mild
1 (1.00%) high severe

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 276

cargo fmt