[][src]Enum octane_json::value::Value

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

Variants

Integer(i64)
Float(f64)
String(String)
Array(Vec<Value>)
Object(HashMap<String, Value>)
Boolean(bool)
Null

Implementations

impl Value[src]

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

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

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

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

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

pub fn as_object(&self) -> Option<&HashMap<String, Value>>[src]

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

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

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

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

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

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

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

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

pub fn parse(dat: &str) -> Option<Self>[src]

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Display for Value[src]

impl Eq for Value[src]

impl FromJSON for Value[src]

impl PartialEq<()> for Value[src]

impl<T> PartialEq<HashMap<String, T, RandomState>> for Value where
    Value: PartialEq<T>, 
[src]

impl PartialEq<String> for Value[src]

impl PartialEq<Value> for Value[src]

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

impl PartialEq<bool> for Value[src]

impl PartialEq<f64> for Value[src]

impl PartialEq<i64> for Value[src]

impl ToJSON for Value[src]

impl TryFrom<Value> for bool[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for i64[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for f32[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for f64[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl<T> TryFrom<Value> for Vec<T> where
    T: FromJSON
[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl<T> TryFrom<Value> for HashMap<String, T> where
    T: FromJSON
[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for ()[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for String[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for u8[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for u16[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for u32[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for u64[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for i8[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for i16[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

impl TryFrom<Value> for i32[src]

type Error = InvalidTypeError

The type returned in the event of a conversion error.

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> FromJSON for T where
    T: TryFrom<Value, Error = InvalidTypeError>, 
[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.