Expand description
E-UTILS
§Random 工具宏
§Exmaple Nanoid
fn main() {
use e_utils::algorithm;
println!("nanoid -> {}", algorithm!(nanoid));
println!("nanoid 16bytes -> {}", algorithm!(nanoid 16));
println!("nanoid 16bytes -> {}", algorithm!(nanoid 16));
println!("nanoid 10bytes [alphabet:expr] -> {}", algorithm!(nanoid 16, &['1', 'b', 'c', '7']));
println!("nanoid unsafe 10bytes -> {}", algorithm!(nanoid unsafe 10));
println!("nanoid unsafe 10bytes [alphabet:expr]-> {}", algorithm!(nanoid unsafe 10, &['1','0']));
}
§Exmaple random
fn main() {
use e_utils::algorithm;
println!("random bool -> {}", algorithm!());
println!("random type -> {}", algorithm!(#u32));
println!("random type[] -> {:?}", algorithm!([u32; 10]));
println!("random range 0-13 -> {}", algorithm!(13));
println!("random range -> {}", algorithm!(0i32..13));
println!("random rgb range -> {:?}", algorithm!(rgb 100,255));
}
Re-exports§
Modules§
- 算法
- 构建
- Dialog window
- fs
- 图像
- Macros
- Parse
- Result
- 系统操作
Macros§
- Macro for various algorithm operations