Trait loadconf::Load [] [src]

pub trait Load: Sized {
    fn try_fallback_load<S: AsRef<str>, P: AsRef<Path>>(
        filename: S,
        path: Option<P>
    ) -> Result<Self, Error>; fn load<S: AsRef<str>>(filename: S) -> Self { ... }
fn try_load<S: AsRef<str>>(filename: S) -> Result<Self, Error> { ... }
fn fallback_load<S: AsRef<str>, P: AsRef<Path>>(
        filename: S,
        path: Option<P>
    ) -> Self { ... } }

Load a struct from a configuration file.

Required Methods

Loads the configuration from the given path or falls back to search if the path is None. Errors if file can't be read or deserialized.

Provided Methods

Find a configuration file and load the contents, falling back to the default.

Panics

This will panic if there are any issues reading or deserializing the file. To catch these errors, use try_load instead.

Find a configuration file and load the contents, falling back to the default. Errors if file can't be read or deserialized.

Loads the configuration from the given path or falls back to search if the path is None.

Panics

This will panic if there are any issues reading or deserializing the file. To catch these errors, use try_load instead.

Implementors