Modules
The helpers4 crate is organised in 13 modules. Each module is a Cargo feature of the same name, and all of them are enabled by default (cargo add helpers4).
Install only what you use
Section titled “Install only what you use”Turn the default features off and name the modules you want:
or in Cargo.toml:
Modules
Section titled “Modules”| Module | Cargo feature | What it covers | Items |
|---|---|---|---|
array | array | Helpers for slices and Vecs that the standard library does not provide. | 13 |
cache | cache | Caches and stores whose entries expire. | 2 |
duration | duration | Parsing and formatting of durations as short human-readable strings (1h30m). | 3 |
env | env | Dotenv (.env) helpers working on plain text: no file or process-environment access, so they are deterministic and easy to test. | 5 |
hex | hex | Hexadecimal encoding and decoding with typed errors. | 6 |
http | http | HTTP header value helpers on plain text: no dependency on an HTTP crate. | 1 |
iter | iter | Helpers for any Iterator, not only slices: work on a lazy, single-use or unbounded source. | 3 |
map | map | Helpers for HashMap that the standard library does not provide. | 3 |
net | net | Network helpers on std::net and plain text: no I/O, no resolution. | 3 |
number | number | Numeric helpers that the standard library does not provide. | 7 |
string | string | String manipulation and formatting helpers. | 14 |
time | time | Time helpers. | 3 |
validate | validate | Shape checks for common user-facing formats: pragmatic subsets that catch real mistakes, not full grammars. | 3 |
Import through the module path (helpers4::string::capitalize): names can repeat across modules on purpose, so never glob-import a module.
Documented version: 0.0.5. Minimum supported Rust version: 1.85.
