This crate enables declarative configuration of backon retry crate strategies via environment variables or configuration files by:
-
Unifying the backoff strategies provided by the backon retry crate into a single enum (see BackoffConfig).
-
Implementing serde’s Deserialize to support loading strategies from various configuration sources.
Durationvalues are deserialized using human-readable formats (e.g.5s,150 ms).
- Loading from TOML and
figmentcrate:
cargo run --example toml- Loading from env and
figmentcrate:
cargo run --example envConsider the following unit test specs for the detailed configuration formats: