Expand description
One loading contract for application-owned conf::Conf schemas.
Values resolve as defaults < TOML < environment < CLI. Loading never changes the process environment or constructs application services. Schema derives supply field names, parsing, help, and secret-aware diagnostics.
Modules§
- example
- Reads an annotated example configuration, commented settings included.
- interpolate
- Environment substitution in TOML string values, before source overrides. Keys are never interpolated. Inserted values are literal, not TOML source.
- reference
- Configuration reference generated from the schema itself.
Structs§
- Byte
Size - Byte size representation.
- Loaded
- Loader
- The application selects its namespace and schema; the loader owns sources.
- Optional
Address - A listener address that may be explicitly disabled with
"off". - Optional
Bytes - A byte limit that may be explicitly lifted with
"unlimited". - Optional
Duration - A duration that may be explicitly turned off with
"off"or"none". - Secret
String - Configuration credentials stay redacted even when the whole schema is logged.
- Toml
Table - A TOML table of entries keyed by the name an operator chose.
- Toml
Value - One TOML value handed over as its own text.
Enums§
- Config
Error - Config
Search - Tests use explicit paths so developer files cannot change their defaults.
- Source
- Metadata only: configuration values, including credentials, are never kept.
- Text
Source - Text written inline or read from a file:
"value"or{ file = "/path" }.
Functions§
- deserialize_
bytes - TOML can use an integer byte count or the human-readable CLI spelling.
- deserialize_
secret - Serde type errors normally quote the rejected value. Secret fields must replace that diagnostic before the configuration parser sees it.
- parse_
bytes - The same byte-size spelling for environment variables and CLI arguments.
- parse_
duration - Parse duration object
1hour 12min 5s - parse_
optional_ address - parse_
optional_ bytes - parse_
optional_ duration - read_
credential - Reads a credential that also has a command-line flag.