[][src]Enum ion::Value

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]

pub fn new_string(value: &str) -> Self[src]

pub fn new_string_array(value: &str) -> Self[src]

pub fn new_array(value: Value) -> Self[src]

pub fn type_str(&self) -> &'static str[src]

pub fn as_string(&self) -> Option<&String>[src]

pub fn is_string(&self) -> bool[src]

pub fn as_str(&self) -> Option<&str>[src]

pub fn as_integer(&self) -> Option<i64>[src]

pub fn as_float(&self) -> Option<f64>[src]

pub fn as_boolean(&self) -> Option<bool>[src]

pub fn as_array(&self) -> Option<&Vec<Value>>[src]

pub fn as_dictionary(&self) -> Option<&Dictionary>[src]

pub fn get(&self, name: &str) -> Option<&Value>[src]

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

convert to type F using the FromIon trait

pub fn parse<F: FromStr>(&self) -> Result<F, F::Err>[src]

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

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Display for Value[src]

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

impl FromIon<Value> for String[src]

type Err = ()

impl FromIon<Value> for Option<String>[src]

type Err = ()

impl FromIon<Value> for u32[src]

type Err = ParseIntError

impl FromIon<Value> for u64[src]

type Err = ParseIntError

impl FromIon<Value> for bool[src]

type Err = ParseBoolError

impl FromIon<Value> for isize[src]

type Err = ParseIntError

impl FromIon<Value> for i8[src]

type Err = ParseIntError

impl FromIon<Value> for i16[src]

type Err = ParseIntError

impl FromIon<Value> for i32[src]

type Err = ParseIntError

impl FromIon<Value> for i64[src]

type Err = ParseIntError

impl FromIon<Value> for usize[src]

type Err = ParseIntError

impl FromIon<Value> for u8[src]

type Err = ParseIntError

impl FromIon<Value> for u16[src]

type Err = ParseIntError

impl FromStr for Value[src]

type Err = IonError

The associated error which can be returned from parsing.

impl PartialEq<Value> for Value[src]

impl StructuralPartialEq for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.