Trait YmlConfig

Source
pub trait YmlConfig<T = HashMap<String, String>>: AbstractConfig<T> {
    // Provided method
    fn load(target: Option<String>) -> Result<T, Error>
       where T: Default,
             HashMap<String, String>: Into<T>,
             Self: Sized { ... }
}
Expand description

Indicates that structure can be initialized from YAML/YML file.

Provided Methods§

Source

fn load(target: Option<String>) -> Result<T, Error>
where T: Default, HashMap<String, String>: Into<T>, Self: Sized,

Load specified YAML/YML file and initialize the structure.

§Arguments
  • target - Path to the YAML/YML file.
§Errors
  • Error::LoadFileError - If the specified YAML/YML file cannot be loaded or parsed.

Implementors§