Trait amethyst_config::Config
source · pub trait Configwhere
Self: Sized,{
fn load<P: AsRef<Path>>(path: P) -> Self;
fn load_no_fallback<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>;
fn load_bytes(bytes: &[u8]) -> Result<Self, ConfigError>;
fn write<P: AsRef<Path>>(&self, path: P) -> Result<(), ConfigError>;
}
Expand description
Trait implemented by the config!
macro.
Required Methods
sourcefn load<P: AsRef<Path>>(path: P) -> Self
fn load<P: AsRef<Path>>(path: P) -> Self
Loads a configuration structure from a file. Defaults if the file fails in any way.
sourcefn load_no_fallback<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>
fn load_no_fallback<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>
Loads a configuration structure from a file.
sourcefn load_bytes(bytes: &[u8]) -> Result<Self, ConfigError>
fn load_bytes(bytes: &[u8]) -> Result<Self, ConfigError>
Loads configuration structure from raw bytes.