Expand description
mitoo is a Rust toolkit library that encapsulates methods such as configuration reading, file operations, encryption and decryption, transcoding, regular expressions, and threading, with various custom or integrated Util tool classes.
Yaml configuration reading
use mitoo::YamlWrapper;
#[test]
fn test_config_util() {
// read the configuration file
let wrapper = YamlWrapper::new("docs/config.yaml").unwrap();
// Directly convert the YAML string into YamlWrapper
// let warpper = YamlWrapper::from_string("......").unwrap();
// Whether it is an object or an array, they are directly operated using the . (dot).
// Here, "address" is an object, "children" is an array, and "name" is an attribute of the objects within the "children" array.
let x = wrapper.get("address.children.name");
println!("address.children.name = {:?}", x);
// The get method is used to retrieve an array, while get_one is used to retrieve the first element.
let x = wrapper.get_one("address.x.y").as_str().unwrap();
println!("address.x.y = {}", x);
}Defined macros:
- mitoo::set
- mitoo::map
Modules§
Macros§
Structs§
- CmdUtil
- Command-line tools
- Collection
Util - Collection-related utility classes, such as for intersections, unions, reversal, element removal, etc.
- Date
Util - Date tools, including common quick generation functions such as obtaining the current day’s time string, formatting, time string parsing, etc.
- EnvUtil
- Environment variable utility class
- Ffmpeg
Util - Streaming media-related processing, operated by means of ffmpeg
- File
Util - General file operations, such as reading and writing, directory creation, deletion, etc.
- HexUtil
- Number system conversion tool
- Http
Util - HTTP tool, which is mainly used as a reference for using reqwest
- IdUtil
- ID tool, used for generating IDs, including UUID and snowflake algorithm
- Json
Wrapper - Json configuration reading
- LogUtil
- Logging utility class
- ReUtil
- Regular expression tools, such as matching, capturing the first one, capturing all, etc.
- Scheduling
Util - Scheduled task utility class
- Secure
Util - Encryption and decryption tools, which also include digest algorithms, etc.
- StrUtil
- String-related operations
- Thread
Util - Thread utility class
- Tree
Node - Tree node structure
- Tree
Util - Tree structure utility class
- UrlUtil
- URL utility class, for extracting parameters, URL encoding and decoding, etc.
- Yaml
Wrapper - Yaml data reading
Enums§
- Exception
- Encapsulate common exception types
- Object
- Basic data objects (including Number, String, bool, none, and time)
Traits§
- Object
Storage - Object storage abstraction definition
- SqlCrud
- Database operation interface definition (conventional CRUD)
- Tree
Data