Enum hipack::value::Value [] [src]

pub enum Value {
    Bool(bool),
    Integer(i64),
    Float(f64),
    String(String),
    List(Vec<Value>),
    Dict(BTreeMap<String, Value>),
}

Variants

Methods

impl Value
[src]

Returns true if the Value is a bool, otherwise returns false.

If the Value is a boolean, return the associated bool. Returns None otherwise.

Returns true if Value is an integer, otherwise returns false.

If the Value is an integer, return the associated i64. Returns None otherwise.

Returns true if Value is a floating point number, otherwise returns false.

If the Value is a floating point number, return the associated f64. Returns None otherwise.

Returns true if Value is a number (either integer or floating point), otherwise returns false.

If the Value is numeric, returns it as a f64. Return None otherwise.

Returns true if Value is a String, otherwise returns false.

If the Value is a string, returns the associated String. Returns None otherwise.

Returns true if Value is a List, otherwise returns false.

If the Value is a list, returns the associated Vec. Returns None otherwise.

Return true if Value is a Dict, otherwise returns false.

If the Value is a dictionary, returns the associated BTreeMap. Returns None otherwise.

Trait Implementations

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 !=.