Function collective::config::from_file
source · pub fn from_file<P: AsRef<Path>, C: DeserializeOwned>(
path: P,
format: Option<ConfigFileFormat>
) -> Result<C, ConfigError>
Expand description
Attempts to read a Config object from the specified path.
The expected file format can be optionally specified. If a format is not specified, the library will attempt to infer it from the file extension.