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§
sourcefn load<P>(path: P) -> Result<Self, ConfigError>
fn load<P>(path: P) -> Result<Self, ConfigError>
Builds the configuration representation from the path to a yaml
sourcefn load_many<P>(path: P) -> Result<Vec<Self>, ConfigError>
fn load_many<P>(path: P) -> Result<Vec<Self>, ConfigError>
Builds a sequence of “Selves” from the provided path to a yaml
sourcefn load_named<P>(path: P) -> Result<BTreeMap<String, Self>, ConfigError>
fn load_named<P>(path: P) -> Result<BTreeMap<String, Self>, ConfigError>
Builds a map of names to “selves” from the provided path to a yaml
sourcefn loads_many(data: &str) -> Result<Vec<Self>, ConfigError>
fn loads_many(data: &str) -> Result<Vec<Self>, ConfigError>
Builds a sequence of “Selves” from the provided string of a yaml
sourcefn loads_named(data: &str) -> Result<BTreeMap<String, Self>, ConfigError>
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.