[][src]Struct readconfig::Configuration

pub struct Configuration { /* fields omitted */ }

A struct that contains a file buffer which represents a configuration file. It can then be used to read options from.

Methods

impl Configuration[src]

pub fn new(paths: &[&str]) -> Result<Self, Error>[src]

The creator for Configuration struct, it takes an array of filepaths and then reads from the first one that's valid. It then returns A configuration struct with the files configuration.

pub fn get_option(self, option_name: &str) -> Result<String, ()>[src]

Takes the name of an option and returns the value as a String

Trait Implementations

impl Clone for Configuration[src]

Auto Trait Implementations

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.