Crate doe

Source
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:

FeatureDescriptionCommand
ctfString manipulation and encoding utilitiescargo add doe -F ctf
clipClipboard managementcargo add doe -F clip
mouseMouse input simulationcargo add doe -F mouse
keyboardKeyboard input simulationcargo add doe -F keyboard
kcmKeyboard, clipboard, and mouse combinedcargo add doe -F kcm
xlsxExcel file manipulationcargo add doe -F xlsx
docxWord document manipulationcargo add doe -F docx
dateDate and time utilitiescargo add doe -F date
screenshotScreenshot capture and processingcargo add doe -F screenshot
imagesImage manipulationcargo add doe -F images
cryptoCryptographic functionscargo add doe -F crypto
asyncrsAsync runtime utilitiescargo add doe -F asyncrs
loggerLogging utilitiescargo add doe -F logger
sqlserverSQL Server database operationscargo add doe -F sqlserver
axumserverAxum server utilitiescargo add doe -F axumserver
ip_addrIP address utilitiescargo add doe -F ip_addr
httpHTTP client and server utilitiescargo add doe -F http
processProcess management utilitiescargo add doe -F process
jsonJSON manipulation utilitiescargo 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.