[][src]Enum erjson::JSONValue

pub enum JSONValue {
    Null,
    Boolean(bool),
    Number(f64),
    String(String),
    Object(HashMap<String, JSONValue>),
    Array(Vec<JSONValue>),
}

Variants

Null
Boolean(bool)
Number(f64)
String(String)
Array(Vec<JSONValue>)

Methods

impl JSONValue[src]

pub fn as_str(&self) -> String[src]

pub fn as_i64(&self) -> i64[src]

pub fn as_f64(&self) -> f64[src]

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

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

pub fn as_map(&self) -> HashMap<String, JSONValue>[src]

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

pub fn exists() -> bool[src]

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

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

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

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

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

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

Trait Implementations

impl Clone for JSONValue[src]

impl Debug for JSONValue[src]

impl Display for JSONValue[src]

impl PartialEq<JSONValue> for JSONValue[src]

impl StructuralPartialEq for JSONValue[src]

Auto Trait Implementations

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.