Trait ronfig::Config [−][src]
Trait implemented by the config!
macro.
Required methods
fn load<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>
[src]
Loads a configuration structure from a file.
fn load_bytes_format(
format: ConfigFormat,
bytes: &[u8]
) -> Result<Self, ConfigError>
[src]
format: ConfigFormat,
bytes: &[u8]
) -> Result<Self, ConfigError>
Loads a configuration structure from a file. Loads configuration structure from raw bytes.
fn write_format<P: AsRef<Path>>(
&self,
format: ConfigFormat,
path: P
) -> Result<(), ConfigError>
[src]
&self,
format: ConfigFormat,
path: P
) -> Result<(), ConfigError>
Writes a configuration structure to a file.
Provided methods
fn write<P: AsRef<Path>>(&self, path: P) -> Result<(), ConfigError>
[src]
👎 Deprecated:
use write_format
instead
Writes a configuration structure to a file using Ron format.
Implementors
impl<T> Config for T where
T: for<'a> Deserialize<'a> + Serialize,
[src]
T: for<'a> Deserialize<'a> + Serialize,
fn load<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>
[src]
fn load_bytes_format(
format: ConfigFormat,
bytes: &[u8]
) -> Result<Self, ConfigError>
[src]
format: ConfigFormat,
bytes: &[u8]
) -> Result<Self, ConfigError>
fn write_format<P: AsRef<Path>>(
&self,
format: ConfigFormat,
path: P
) -> Result<(), ConfigError>
[src]
&self,
format: ConfigFormat,
path: P
) -> Result<(), ConfigError>