Expand description
First-class environment definitions and layered resolution. First-class environment definitions and layered resolution.
An Environments value holds compiled-in environment TOML tables and,
optionally, an environments.toml file plus a fallback for names known to
neither. Resolving a name merges those layers (later wins, shallow —
no deep-merging into nested tables/arrays) into one EnvSource, then
threads it (plus an app-scoped environment-variable source) through an
crate::env_config::EnvConfig struct’s own assembly instructions.
This module owns no per-field knowledge at all. Consumers can create structs
that use #[derive(EnvConfig)] to create strongly-typed environment
configs populated by Environments.
Structs§
- EnvTable
- A compiled-in environment’s raw configuration, expressed as a TOML table so
it can merge with the
environments.tomlfile layer on equal footing. Values accepted byEnvTable::withcover the common Rust literal types (&str/String/bool/integers/floats andVec<T>of those) viaInto<toml::Value>, so a compiled-in environment reads like ordinary Rust, not embedded TOML text. - Environments
- Engine-owned environment system: compiled/file tables + resolution + active-env state.