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]
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 Display for Value
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl FromIon<Value> for String
[src]
impl FromIon<Value> for Option<String>
[src]
impl FromIon<Value> for isize
[src]
impl FromIon<Value> for i8
[src]
impl FromIon<Value> for i16
[src]
impl FromIon<Value> for i32
[src]
impl FromIon<Value> for i64
[src]
impl FromIon<Value> for usize
[src]
impl FromIon<Value> for u8
[src]
impl FromIon<Value> for u16
[src]
impl FromIon<Value> for u32
[src]
impl FromIon<Value> for u64
[src]
impl FromIon<Value> for bool
[src]
impl Debug for Value
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Value
[src]
fn eq(&self, __arg_0: &Value) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Value) -> bool
[src]
This method tests for !=
.
impl Clone for Value
[src]
fn clone(&self) -> Value
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl FromStr for Value
[src]
type Err = IonError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Value, IonError>
[src]
Parses a string s
to return a value of this type. Read more