Trait nyx_space::io::ConfigRepr

source ·
pub trait ConfigRepr: Debug + Sized + Serialize + DeserializeOwned {
    // Provided methods
    fn load<P>(path: P) -> Result<Self, ConfigError>
       where P: AsRef<Path> { ... }
    fn load_many<P>(path: P) -> Result<Vec<Self>, ConfigError>
       where P: AsRef<Path> { ... }
    fn load_named<P>(path: P) -> Result<BTreeMap<String, Self>, ConfigError>
       where P: AsRef<Path> { ... }
    fn loads_many(data: &str) -> Result<Vec<Self>, ConfigError> { ... }
    fn loads_named(data: &str) -> Result<BTreeMap<String, Self>, ConfigError> { ... }
}

Provided Methods§

source

fn load<P>(path: P) -> Result<Self, ConfigError>
where P: AsRef<Path>,

Builds the configuration representation from the path to a yaml

source

fn load_many<P>(path: P) -> Result<Vec<Self>, ConfigError>
where P: AsRef<Path>,

Builds a sequence of “Selves” from the provided path to a yaml

source

fn load_named<P>(path: P) -> Result<BTreeMap<String, Self>, ConfigError>
where P: AsRef<Path>,

Builds a map of names to “selves” from the provided path to a yaml

source

fn loads_many(data: &str) -> Result<Vec<Self>, ConfigError>

Builds a sequence of “Selves” from the provided string of a yaml

source

fn loads_named(data: &str) -> Result<BTreeMap<String, Self>, ConfigError>

Builds a sequence of “Selves” from the provided string of a yaml

Object Safety§

This trait is not object safe.

Implementors§