Skip to main content

read_config

Function read_config 

Source
pub fn read_config(flag: Option<&Path>) -> Result<Option<Table>, SettingsError>
Expand description

Reads and parses config.toml, or Ok(None) if none applies. An explicit flag path must exist (a read error is a usage error); otherwise $PLUGMEM_CONFIG, then the platform path from crate::default_config_path, are read only if present. Wrappers call this once, then pass the table to Settings::from_table and also read their own keys (batch size, workers) from it.