Enum config::Value [] [src]

pub enum Value<'a> {
    String(Cow<'a, str>),
    Integer(i64),
    Float(f64),
    Boolean(bool),
    Table(HashMap<String, Value<'a>>),
    Array(Vec<Value<'a>>),
}

A configuration value.

Has an underlying or native type that comes from the configuration source but will be coerced into the requested type.

Variants

Methods

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

Gets the underlying value as a string, performing a conversion only if neccessary.

Gets the underlying type as a boolean, performing a conversion only if neccessary.

Gets the underlying type as an integer, performing a conversion only if neccessary.

Gets the underlying type as a floating-point, performing a conversion only if neccessary.

Trait Implementations

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

Formats the value using the given formatter.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> From<String> for Value<'a>
[src]

Performs the conversion.

impl<'a> From<&'a str> for Value<'a>
[src]

Performs the conversion.

impl<'a> From<i64> for Value<'a>
[src]

Performs the conversion.

impl<'a> From<f64> for Value<'a>
[src]

Performs the conversion.

impl<'a> From<bool> for Value<'a>
[src]

Performs the conversion.