[][src]Struct configster::OptionProperties

pub struct OptionProperties {
    pub option: String,
    pub value: Value,
}

The type for each Option; holds the information for each element of a line in a config file.

Examples

A function argument:

fn assign_properties(st_option_props: &configster::OptionProperties, homedir: &str) {
    let mut value = "$HOME/Documents";
    value = st_option_props.value.primary.replace("$HOME", &homedir);
}

A return type:

fn parse(
    opt_cfg: Option<String>,
    homedir: String,
) -> io::Result<Vec<configster::OptionProperties>> {
    // ...
    Ok(config_vec)
}

Fields

option: Stringvalue: Value

Trait Implementations

impl Debug for OptionProperties[src]

impl PartialEq<OptionProperties> for OptionProperties[src]

impl StructuralPartialEq for OptionProperties[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, 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.