Expand description
doe is a versatile Rust crate that significantly enhances the development workflow by offering an extensive collection of useful macros and utility functions. It streamlines common tasks and provides convenient features for clipboard management, state management, keyboard input, and mouse interaction. Additionally, doe includes robust cryptographic functions, enabling developers to easily integrate secure encryption, decryption, and hashing capabilities into their applications, ensuring data integrity and confidentiality.
§Available Features:
Feature | Description | Command |
---|---|---|
ctf | String manipulation and encoding utilities | cargo add doe -F ctf |
clip | Clipboard management | cargo add doe -F clip |
mouse | Mouse input simulation | cargo add doe -F mouse |
keyboard | Keyboard input simulation | cargo add doe -F keyboard |
kcm | Keyboard, clipboard, and mouse combined | cargo add doe -F kcm |
xlsx | Excel file manipulation | cargo add doe -F xlsx |
docx | Word document manipulation | cargo add doe -F docx |
date | Date and time utilities | cargo add doe -F date |
screenshot | Screenshot capture and processing | cargo add doe -F screenshot |
images | Image manipulation | cargo add doe -F images |
crypto | Cryptographic functions | cargo add doe -F crypto |
asyncrs | Async runtime utilities | cargo add doe -F asyncrs |
logger | Logging utilities | cargo add doe -F logger |
sqlserver | SQL Server database operations | cargo add doe -F sqlserver |
axumserver | Axum server utilities | cargo add doe -F axumserver |
ip_addr | IP address utilities | cargo add doe -F ip_addr |
http | HTTP client and server utilities | cargo add doe -F http |
process | Process management utilities | cargo add doe -F process |
json | JSON manipulation utilities | cargo add doe -F json |
Re-exports§
pub use consts::consts::*;
pub use fs::fs::*;
pub use macros::macros::*;
pub use rand::rand::*;
pub use structs::structs::*;
pub use timer::impl_timer::*;
pub use traits::traits::*;
pub use zoml::zoml::*;
Modules§
- asyncrs
- Async runtime utilities for concurrent programming
- axumserver
- Axum web server utilities for building HTTP APIs
- clipboard
- Clipboard operations for copying and pasting data
- color
- Color format conversions between RGB and HEX
- consts
- Common constants used throughout the crate
- crypto
- Cryptographic functions including AES, RSA, SHA, MD5 and Blake3
- ctf
- ctf module provides utility functions like
permutations
,hex_encode
,hex_decode
,base64_encode
,base64_decode
,php_urlencode
,php_urldecode
. convert_to_pinyin_with_non_chinese - date
- date module contains functions for get now,get_recent_seven_days,normal_date_to_excel_date,excel_date_to_normal_date
- docx
- xlsx module contains functions for reading editing docx file docx_replace
- fs
- The file system (fs) module provides functions and structs for performing operations on the file system. It includes functions for reading, writing, creating, and deleting files and directories.
- httprs
- reqwest module is easy way to use reqwest crate for http requests
- images
- images module contains functions resize add paddings,convert image format
- ip_addr
- IP address parsing and manipulation utilities
- json
- json module contains functions for reading, writing, and manipulating JSON files or content.
- keyboard
- keyboard module contains functions and structs related to keyboard input. It allows the user to simulate keyboard input, capture keystrokes, and perform other keyboard-related operations.
- logger
- logger module contains functions for logging
- macros
- macros module contains all utility macros for development
- mouse
- mouse module contains functions and structs related to mouse input. It allows the user to simulate mouse input, capture mouse movements and clicks, and perform other mouse-related operations.
- process
- get all process (name,pid) and kill process by name or pid
- rand
- Random number generation using Linear Congruential Generator (LCG)
- screenshot
- screenshot module contains functions for screenshot and get hex from screenshot image
- sqlserver
- SQL Server database operations including connection management and query execution
- structs
- structs module contains definitions of custom data structures like
Bfn
,Bts
,waker_fn
. - sys_
random - generate random number with sys fn
Here’s a markdown documentation for the
sys_random
module: - timer
- timer module provides functions and structs for creating and managing timers. It allows the user to schedule tasks to be executed at a specific time or interval.
- traits
- traits module contains trait definitions that define shared behavior and functions
- xlsx
- xlsx module contains functions and structs for reading, writing, and manipulating Excel files in the XLSX format.
- zoml
- zoml module contains functions for converting data between the ZOML format and CSV format.
Macros§
- args
- get argument and collect into Vec<String>
- as_to
- convert type
- bfn
- implments Bfn struct and bfn! macro for Box<dyn Fn()> trait object
- binary_
to_ decimal - convert binary string to decimal
- btreemap
- macro for BTreeMap
- bts
- implments Bts struct and bts! macro for Box<\dyn ToString> trait object
- command
- run command
- deduped_
sorted - sorted and deduped Vec
- dyn_
error - has_
nightly_ compiler - has stable rust nightly return bool
- has_
powershell - has_
stable_ compiler - has stable rust compiler return bool
- hashmap
- macro for HashMap
- impl_
all - implement Default,Debug,Display,Clone,Drop for struct
- impl_
clone - implmemt Clone for Struct
- impl_
debug - implmemt Debug for Struct
- impl_
default - implmemt Default for Struct
- impl_
display - implmemt Display for Struct
- impl_
drop - implmemt Drop for Struct
- include_
string - input
- get user input from terminal,return String
- input_
lines - max
- expr return max value
- memory_
address - expr return memory address
- min
- expr return min value
- multiply_
matrix - mutiply two matrix
- powf
- returns a raised to the b power
- read_
csv - read .csv file and Collect into Vec<Vec<String>>
- remove_
file_ or_ folder - remove file or folder
- run_
time - set_
interval - run a function repeatedly, beginning after some millis, then repeating continuously at the given interval.
- set_
timeout - run a function once after a particularized delay(millis)
- snail_
sort - return the array elements arranged from outermost elements to the middle element, traveling clockwise (n x n)
- socketaddr
- socketaddr
- sorted
- sorted new Vec
- split_
to_ vec - Spliy &str by spliter and collect into Vec<String>
- system
- like pythons os.system() function
- system_
cmd - like pythons os.system() function
- targets
- implment targets! for return Vec<(Box<dyn ToString>,Box<dyn ToString>)>
- utc_
timestamp - get current UTC-timestamp
- vec_
element_ clone - clone element by index
- vec_
element_ convert - convert vec elements type
- vec_
element_ parse - parse Vec element to type, parse Vec<&str> Collect to Vec<type>
- vec_
element_ position_ all - find element position and collect into Vec
- vec_
element_ remove - find the fist element and remove
- vec_
element_ remove_ all - find the element and remove all
- vec_
element_ take - take size of elements and return a new vec
- vec_
element_ to_ string - convert vec item to String,return Vec<String>
- vec_
enumerate - enumerate all indexs and elements collect tuple of vec
- vec_
merge - Merge two Vec return merged Vec
- vec_
slice - slice vec by range
- vec_
sort - sort vec and return sorted vec
- vec_
type - get vec type ,return string type value
- vec_zip
- zip two vec elements in tuple
Functions§
- digits
- digits
- generate_
all_ possible_ vec - The Vec sort all elements can be repeated to define the longest shortest size
- letters_
and_ digits - letters_and_digits
- lowercase_
letters - lowercase_letters
- permutations
- permutations
- system
- Rust is a wrapper for the standard library’s std::process::Command function, which is used to execute external commands
- uppercase_
letters - uppercase_letters
Type Aliases§
- DynError
- Rust is a wrapper for the standard library’s std::error::Error trait, which is used to define the behavior of types that can be used for error handling. It provides a way to represent errors in a consistent and type-safe manner.