Skip to main content

load

Function load 

Source
pub fn load(path: &Path) -> Result<Config, CoreError>
Expand description

Load config from path. A missing file is a fresh install, NOT an error (version must work day one). Unreadable or invalid TOML is CoreError::ConfigInvalid (exit 3) naming the path. Unknown keys WARN (tracing) and are otherwise tolerated — no deny_unknown_fields, ever (Pitfall 7). Sub-second poll_interval_secs is REFUSED (exit 3, poll_interval_too_small) — the strict path.