rskit_util/lib.rs
1//! Minimal domain-free utility crate for the rskit ecosystem.
2//!
3//! Provides fundamental helper modules for string casing, safe truncation,
4//! collection transformation, safe environment variable parsing, duration/byte
5//! size parsing, and stateless mathematical exponential backoff.
6//!
7//! # Modules
8//!
9//! - [`backoff`]: State-free mathematical backoff calculations with jitter.
10//! - [`bytes`]: Formatting and parsing human-readable data sizes.
11//! - [`collections`]: Vector grouping, chunking, indexing, and partition helpers.
12//! - [`mod@env`]: Safe environment variable parsing with defaults.
13//! - [`glob`]: Shell-style `*`/`?` matching over single string segments.
14//! - [`hash`]: Content/interop hashing — BLAKE3 and SHA-256.
15//! - [`secret`]: Prevent accidental credential leaks in logs/debug outputs.
16//! - [`sensitive`]: Matching helpers for names that commonly carry secrets.
17//! - [`strings`]: Casing, safe truncation, unique-shorthand resolution, and "did you mean?" suggestions.
18//! - [`template`]: Lightweight template engine (`{name}` interpolation).
19//! - [`time`]: Duration parsing, UTC date/time conversion, RFC 3339 helpers, and timing wrappers.
20
21#![warn(missing_docs)]
22
23pub mod backoff;
24pub mod bytes;
25pub mod collections;
26mod decimal;
27pub mod env;
28pub mod glob;
29pub mod hash;
30pub mod secret;
31pub mod sensitive;
32pub mod strings;
33pub mod template;
34pub mod time;
35
36pub(crate) use decimal::parse_decimal_scaled;
37pub use secret::SecretString;
38pub use sensitive::SecretKeyMatcher;
39pub use template::{Placeholder, Template, TemplatePart};