[−][src]Trait amethyst::prelude::Config
Trait implemented by the config!
macro.
Required methods
fn load<P>(path: P) -> Self where
P: AsRef<Path>,
P: AsRef<Path>,
Loads a configuration structure from a file. Defaults if the file fails in any way.
fn load_no_fallback<P>(path: P) -> Result<Self, ConfigError> where
P: AsRef<Path>,
P: AsRef<Path>,
Loads a configuration structure from a file.
fn load_bytes(bytes: &[u8]) -> Result<Self, ConfigError>
Loads configuration structure from raw bytes.
fn write<P>(&self, path: P) -> Result<(), ConfigError> where
P: AsRef<Path>,
P: AsRef<Path>,
Writes a configuration structure to a file.
Implementors
impl<T> Config for T where
T: Deserialize<'a> + Serialize + Default,
[src]
T: Deserialize<'a> + Serialize + Default,
fn load<P>(path: P) -> T where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
fn load_no_fallback<P>(path: P) -> Result<T, ConfigError> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
fn load_bytes(bytes: &[u8]) -> Result<T, ConfigError>
[src]
fn write<P>(&self, path: P) -> Result<(), ConfigError> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,