Enum ion::Value [] [src]

pub enum Value {
    String(String),
    Integer(i64),
    Float(f64),
    Boolean(bool),
    Array(Row),
    Dictionary(Dictionary),
}

Variants

String(String)Integer(i64)Float(f64)Boolean(bool)Array(Row)Dictionary(Dictionary)

Methods

impl Value
[src]

fn type_str(&self) -> &'static str

fn as_string(&self) -> Option<&String>

fn as_str(&self) -> Option<&str>

fn as_integer(&self) -> Option<i64>

fn as_float(&self) -> Option<f64>

fn as_boolean(&self) -> Option<bool>

fn as_array(&self) -> Option<&Vec<Value>>

fn as_dictionary(&self) -> Option<&Dictionary>

fn get(&self, name: &str) -> Option<&Value>

fn from_ion<F: FromIon<Value>>(&self) -> Result<F, F::Err>

convert to type F using the FromIon trait

fn parse<F: FromStr>(&self) -> Result<F, F::Err>

parse to the resulting type, if the inner value is not a string, convert to string first

Trait Implementations

impl Display for Value
[src]

fn fmt(&self, f: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl Clone for Value
[src]

fn clone(&self) -> Value

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl PartialEq for Value
[src]

fn eq(&self, __arg_0: &Value) -> bool

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

fn ne(&self, __arg_0: &Value) -> bool

This method tests for !=.

impl Debug for Value
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl FromStr for Value
[src]

type Err = IonError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<ValueIonError>

Parses a string s to return a value of this type. Read more