1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
//! E-UTILS
//! # Random 工具宏
//!
//! # Exmaple `Nanoid`
//! ```no_run
//! 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`
//! ```no_run
//! 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));
//! }
//! ```
#![allow(
clippy::cognitive_complexity,
clippy::large_enum_variant,
clippy::module_inception,
clippy::needless_doctest_main
)]
#![warn(
missing_debug_implementations,
missing_docs,
rust_2018_idioms,
unreachable_pub
)]
#![deny(unused_must_use)]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
))]
/// Macros
#[macro_use]
#[path = "./macros.rs"]
pub mod macros;
/// Parse
#[path = "./parse.rs"]
pub mod parse;
/// Result
#[path = "./res.rs"]
pub mod res;
pub use res::*;
cfg_fs! {
/// fs
pub mod fs;
}
/// 算法
pub mod algorithm;
cfg_ui! {
/// UI窗口
#[cfg(target_os = "windows")]
pub mod ui;
}
cfg_macros! {
pub use e_macros::*;
}
/// 系统操作
pub mod system;
cfg_images! {
/// 图像
pub mod images;
}
/// Http
pub mod http;