oa_gateway::config

Function load

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

Reads and parses the TOML file at path.

A path the user named is a mistake when missing, not a cue to quietly run some other configuration.

§Errors

Returns an error if the file does not exist, cannot be read, or is not a Config — including when it names a key no section declares.