Trait ronfig::Config[][src]

pub trait Config where
    Self: Sized
{ fn load<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>;
fn load_bytes_format(
        format: ConfigFormat,
        bytes: &[u8]
    ) -> Result<Self, ConfigError>;
fn write_format<P: AsRef<Path>>(
        &self,
        format: ConfigFormat,
        path: P
    ) -> Result<(), ConfigError>; fn write<P: AsRef<Path>>(&self, path: P) -> Result<(), ConfigError> { ... } }

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]

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]

Writes a configuration structure to a file.

Loading content...

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.

Loading content...

Implementors

impl<T> Config for T where
    T: for<'a> Deserialize<'a> + Serialize
[src]

Loading content...