[][src]Struct kern::Config

pub struct Config<'a> { /* fields omitted */ }

Configuration file parser

Implementations

impl<'a> Config<'a>[src]

pub fn get<T: FromStr>(&self, name: &str, default: T) -> T[src]

Get parsed value from config or default

pub fn value(&self, name: &str, default: &'a str) -> &str[src]

Get &str value from config or default

pub fn exists(&self, name: &str) -> bool[src]

Check whether key exists in config

pub fn conf(&self) -> &BTreeMap<&str, &str>[src]

Get config key/value map

pub fn read(path: &str, buf: &'a mut String) -> Result<Self, Fail>[src]

Read config from file

pub fn from(raw: &'a str) -> Self[src]

Create new config from raw config string

Trait Implementations

impl<'a> Clone for Config<'a>[src]

impl<'a> Debug for Config<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Config<'a>

impl<'a> Send for Config<'a>

impl<'a> Sync for Config<'a>

impl<'a> Unpin for Config<'a>

impl<'a> UnwindSafe for Config<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.