Expand description
General-purpose helpers, one module per category.
Module and function names may overlap across modules (array::compact
and object::compact are different functions); import through the module
path, e.g. helpers4::string::capitalize.
Modulesยง
- array
- Helpers for slices and
Vecs that the standard library does not provide. - cache
- Caches and stores whose entries expire. The clock is always passed in, never read.
- duration
- Parsing and formatting of durations as short human-readable strings (
1h30m). - env
- Dotenv (
.env) helpers working on plain text: no file or process-environment access, so they are deterministic and easy to test. Read the file yourself, edit the content here, and write it back. - hex
- Hexadecimal encoding and decoding with typed errors.
- http
- HTTP header value helpers on plain text: no dependency on an HTTP crate.
- iter
- Helpers for any
Iterator, not only slices: work on a lazy, single-use or unbounded source. - map
- Helpers for
HashMapthat the standard library does not provide. - net
- Network helpers on
std::netand plain text: no I/O, no resolution. - number
- Numeric helpers that the standard library does not provide.
- string
- String manipulation and formatting helpers.
- time
- Time helpers. Reading the clock is explicit and fallible: a clock set before 1970 is an error, not
0. - validate
- Shape checks for common user-facing formats: pragmatic subsets that catch real mistakes, not full grammars. None of them normalizes or parses the value, only checks it.