Crate macro_toolset

Source
Expand description

Dev deps: some useful macros.

Re-exports§

pub use string as string_v2;

Modules§

base64
Base64 related macros
hash
Hash related macros
misc
Misc
random
Random number / string generation utilities
string
Useful StringExt utilities for crate::str_concat macros

Macros§

b64_decode
Decode given base64 string to bytes.
b64_encode
Encode given buffer into base64 string.
b64_encode_bytesDeprecated
Base64 encode with bytes::Bytes returned
calc_hash
Calculate Hash.
calc_hash_str
A helper macro to get string from hash result
crate_version
Helper to create version string or build time for your crate.
init_tracing_simple
Init tracing_subscriber with default settings.
md5
Calculate MD5 hash.
now
Faster way to get current timestamp other than chrono::Local::now().timestamp(), 12x faster on my machine.
random_choice
Generate a random string by choosing ones from given candidates.
random_str
See RandStr and RandHexStr for more information.
random_string
Generate random String.
random_string_fastDeprecated
Generate random string base on xor-shift algorithm.
sha256
Calc SHA256 hash.
sha384
Calculate SHA384 hash.
sha512
Calculate SHA512 hash.
str_concat
Fast concat String / &str / number.
str_iter_wrapper
See IterWrapper.
str_wrapper
See StrWrapper and StringWrapper.
urlencoding_str
See Encode or Decode for more information.
wrapper
Helper macro for creating a wrapper type.