[−][src]Enum no_proto::json_flex::NP_JSON
Represents an JSON value
Variants
String(String)
String JSON type
Integer JSON type
Float JSON type
Dictionary(JSMAP)
Map JSON type
List JSON type
NULL json type
boolean false type
boolean true type
Implementations
impl NP_JSON
[src]
pub fn clone(&self) -> NP_JSON
[src]
copy this value and it's children
pub fn into_string(&self) -> Option<&String>
[src]
Get this value as a string
pub fn into_i64(&self) -> Option<&i64>
[src]
Get this value as an i64
pub fn into_f64(&self) -> Option<&f64>
[src]
Get this value as an f64
pub fn into_hashmap(&self) -> Option<&JSMAP>
[src]
Get this value as a hashmap
pub fn into_vec(&self) -> Option<&Vec<NP_JSON>>
[src]
Get this value as a list
pub fn is_null(&self) -> bool
[src]
Check if this value is null
pub fn is_true(&self) -> bool
[src]
Check if this value is boolean true
pub fn is_false(&self) -> bool
[src]
Check if this value is boolean false
pub fn is_array(&self) -> bool
[src]
Check if this value is array
pub fn is_dictionary(&self) -> bool
[src]
Check if this value is map
pub fn is_string(&self) -> bool
[src]
Check if this value is string
pub fn is_integer(&self) -> bool
[src]
Check if this value is an integer
pub fn is_float(&self) -> bool
[src]
Check if this value is float
pub fn unwrap_string(&self) -> Option<&String>
[src]
Get a reference to the string in this value if it's a string
pub fn unwrap_i64(&self) -> Option<&i64>
[src]
Get a reference to the i64 in this value if it's a i64
pub fn unwrap_f64(&self) -> Option<&f64>
[src]
Get a reference to the f64 in this value if it's a f64
pub fn unwrap_hashmap(&self) -> Option<&JSMAP>
[src]
Get a reference to the hashmap in this value if it's a hashmap
pub fn unwrap_vec(&self) -> Option<&Vec<NP_JSON>>
[src]
Get a reference to the list in this value if it's a list
pub fn stringify(&self) -> String
[src]
Stringify this JSON object and it's children
Trait Implementations
impl Debug for NP_JSON
[src]
impl<'a> Index<&'a str> for NP_JSON
[src]
type Output = NP_JSON
The returned type after indexing.
pub fn index<'b>(&'b self, id: &str) -> &'b Self::Output
[src]
impl Index<String> for NP_JSON
[src]
type Output = NP_JSON
The returned type after indexing.
pub fn index<'a>(&'a self, id: String) -> &'a Self::Output
[src]
impl Index<usize> for NP_JSON
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,