Crates.io | colorid |
lib.rs | colorid |
version | 0.0.6 |
source | src |
created_at | 2022-08-28 11:43:09.333693 |
updated_at | 2022-09-28 15:45:41.793085 |
description | The unique 4-colors-ID string generator in in Rust |
homepage | https://github.com/rustq/colorid |
repository | https://github.com/rustq/colorid.git |
max_upload_size | |
id | 653834 |
size | 25,359 |
Color as Identify - The unique 4-colors-ID string generator in in Rust
一款基于 4 种颜色来表示身份的 Rust 随机 ID 生成器
[dependencies]
colorid = "0.0.6"
use colorid::colorid;
fn main() {
let id = colorid!(); // #A3F68E-#33EFAF-#8CB823-#D82C91
}
COLORID: #A3F68E-#33EFAF-#8CB823-#D82C91
colorid time: [735.43 ns 735.51 ns 735.61 ns]
uuid time: [750.16 ns 750.33 ns 750.62 ns]
nanoid time: [926.34 ns 926.45 ns 926.57 ns]