Enum config::Value [] [src]

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

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 Value
[src]

Converts self into a string, if possible. Returns None otherwise.

Converts self into a bool, if possible. Returns None otherwise.

Converts self into an i64, if possible. Returns None otherwise.

Converts self into a f64, if possible. Returns None otherwise.

If the Value is a Table, returns the associated Map. Returns None otherwise.

If the Value is an Array, returns the associated Vector. Returns None otherwise.

Trait Implementations

impl Debug for Value
[src]

Formats the value using the given formatter.

impl Clone for Value
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Value
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl From<String> for Value
[src]

Performs the conversion.

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

Performs the conversion.

impl From<i64> for Value
[src]

Performs the conversion.

impl From<f64> for Value
[src]

Performs the conversion.

impl From<bool> for Value
[src]

Performs the conversion.

impl<T> From<HashMap<String, T>> for Value where
    T: Into<Value>, 
[src]

Performs the conversion.

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

Performs the conversion.