[][src]Trait manaconf::ValueRead

pub trait ValueRead: Sized {
    fn get_value<T, K>(&self, key: K) -> Result<Option<T>, ValueReadError>
    where
        K: AsRef<Key>,
        T: TryFromValue
; fn get_expected_value<T, K>(&self, key: K) -> Result<T, ValueReadError>
    where
        K: AsRef<Key>,
        T: TryFromValue
, { ... }
fn bind<T: TryFromValueRead>(&self) -> Result<T, ValueReadError> { ... } }

Required methods

fn get_value<T, K>(&self, key: K) -> Result<Option<T>, ValueReadError> where
    K: AsRef<Key>,
    T: TryFromValue

Gets a value from configuration using the given key

Attempts to convert the value to T if the conversion is supported

Loading content...

Provided methods

fn get_expected_value<T, K>(&self, key: K) -> Result<T, ValueReadError> where
    K: AsRef<Key>,
    T: TryFromValue

Gets a value from configuration using the given key where the value is expected to exist, and thus it's an error if it doesn't.

Attempts to convert the value to T if the conversion is supported

fn bind<T: TryFromValueRead>(&self) -> Result<T, ValueReadError>

Bind values to type T

Loading content...

Implementors

impl ValueRead for Config[src]

impl<'a> ValueRead for Section<'a>[src]

Loading content...