Expand description
Configuration file discovery and loading.
Provides the three-stage config search (explicit path → ./config.toml →
$XDG_CONFIG_HOME/<app>/config.toml) and a generic TOML loader that
produces semantic errors.
Structs§
- Common
Config File - Common config-file fields shared by every project crate. Flatten into
your
ConfigFileRawwith#[serde(flatten)].
Enums§
Functions§
- find_
config_ file - Locate a configuration file using a two-stage search:
- load_
toml - Deserialise a TOML file into
T, wrapping I/O and parse failures inConfigFileError. - resolve_
log_ settings - Resolve
log_levelandlog_formatfrom CLI → config-file → defaults. - xdg_
config_ dir - Resolve
$XDG_CONFIG_HOME/<app_name>, falling back to$HOME/.config/<app_name>when the variable is unset.