[][src]Enum json_pest_parser::JSONValue

pub enum JSONValue<'a, S: BuildHasher> {
    Object(HashMap<&'a str, JSONValue<'a, S>, S>),
    Array(Vec<JSONValue<'a, S>>),
    String(&'a str),
    Number(Number),
    Boolean(bool),
    Null,
}

Variants

Object(HashMap<&'a str, JSONValue<'a, S>, S>)
Array(Vec<JSONValue<'a, S>>)
String(&'a str)
Number(Number)
Boolean(bool)
Null

Implementations

impl<'a, S: BuildHasher> JSONValue<'a, S>[src]

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

pub fn to_object(&self) -> Option<&HashMap<&'a str, JSONValue<'a, S>, S>>[src]

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

pub fn to_array(&self) -> Option<&Vec<JSONValue<'a, S>>>[src]

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

pub fn to_str(&self) -> Option<&'a str>[src]

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

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

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

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

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

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

Trait Implementations

impl<'a, S: Debug + BuildHasher> Debug for JSONValue<'a, S>[src]

impl<'a, S: PartialEq + BuildHasher> PartialEq<JSONValue<'a, S>> for JSONValue<'a, S>[src]

impl<'a, S: BuildHasher> StructuralPartialEq for JSONValue<'a, S>[src]

impl<'a, S: BuildHasher> ToString for JSONValue<'a, S>[src]

Auto Trait Implementations

impl<'a, S> RefUnwindSafe for JSONValue<'a, S> where
    S: RefUnwindSafe

impl<'a, S> Send for JSONValue<'a, S> where
    S: Send

impl<'a, S> Sync for JSONValue<'a, S> where
    S: Sync

impl<'a, S> Unpin for JSONValue<'a, S> where
    S: Unpin

impl<'a, S> UnwindSafe for JSONValue<'a, S> where
    S: UnwindSafe

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> 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.