Trait FromYaml

Source
pub trait FromYaml {
    // Required method
    fn load_from_yaml<P>(path: P) -> Result<Self, Box<Error>>
       where P: AsRef<Path>,
             Self: Sized;
}
Expand description

Trait for configuration structures that can be loaded from YAML files. This trait has a blanket implementation for any structure implementing serde::Deserialize.

Required Methods§

Source

fn load_from_yaml<P>(path: P) -> Result<Self, Box<Error>>
where P: AsRef<Path>, Self: Sized,

Loads configuration from a YAML file.

Implementors§

Source§

impl<D> FromYaml for D