Skip to main content

load_config_file

Function load_config_file 

Source
pub fn load_config_file(
    path: &Path,
    missing_is_error: bool,
) -> Result<BhtuneConfig>
Expand description

Load a bhtune config from path.

A missing file resolves to Ok(BhtuneConfig::default()) when missing_is_error is false (the auto-discovered path may legitimately not exist yet); with an explicit --config path a missing file is a hard error instead. A file that exists but fails to parse as TOML is always a hard error – a config typo should never be silently ignored.