pub trait FromConfigFile {
// Required method
fn from_config_file<P>(path: P) -> Result<Self, ConfigFileError>
where P: AsRef<Path>,
Self: Sized;
}
Expand description
Trait for loading a struct from a configuration file. This trait is automatically implemented when serde::Deserialize is.
Required Methods§
Sourcefn from_config_file<P>(path: P) -> Result<Self, ConfigFileError>
fn from_config_file<P>(path: P) -> Result<Self, ConfigFileError>
Load ourselves from the configuration file located at @path