[][src]Trait json_trait_rs::JsonType

pub trait JsonType: Clone + Debug + PartialEq + Sync + Send {
    fn as_array<'json>(
        &'json self
    ) -> Option<Box<dyn ExactSizeIterator<Item = &Self> + 'json>>;
fn as_boolean(&self) -> Option<bool>;
fn as_integer(&self) -> Option<i128>;
fn as_null(&self) -> Option<()>;
fn as_number(&self) -> Option<f64>;
fn as_object<'json>(&'json self) -> Option<JsonMap<'json, Self>>
    where
        JsonMap<'json, Self>: JsonMapTrait<'json, Self>
;
fn as_string(&self) -> Option<&str>;
fn get_attribute<R: AsRef<str>>(&self, attribute_name: R) -> Option<&Self>;
fn get_index(&self, index: usize) -> Option<&Self>; fn is_array(&self) -> bool { ... }
fn is_boolean(&self) -> bool { ... }
fn is_integer(&self) -> bool { ... }
fn is_null(&self) -> bool { ... }
fn is_number(&self) -> bool { ... }
fn is_object<'json>(&'json self) -> bool
    where
        JsonMap<'json, Self>: JsonMapTrait<'json, Self>
, { ... }
fn is_string(&self) -> bool { ... }
fn has_attribute(&self, attribute_name: &str) -> bool { ... }
fn get<I: Index<Self>>(&self, index: I) -> Option<&Self> { ... }
fn primitive_type<'json>(&'json self) -> EnumJsonType
    where
        JsonMap<'json, Self>: JsonMapTrait<'json, Self>
, { ... }
fn fragment<'json, R: AsRef<str>>(&'json self, fragment: R) -> Option<&Self>
    where
        JsonMap<'json, Self>: JsonMapTrait<'json, Self>
, { ... } }

Required methods

fn as_array<'json>(
    &'json self
) -> Option<Box<dyn ExactSizeIterator<Item = &Self> + 'json>>

fn as_boolean(&self) -> Option<bool>

fn as_integer(&self) -> Option<i128>

fn as_null(&self) -> Option<()>

fn as_number(&self) -> Option<f64>

fn as_object<'json>(&'json self) -> Option<JsonMap<'json, Self>> where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 

fn as_string(&self) -> Option<&str>

fn get_attribute<R: AsRef<str>>(&self, attribute_name: R) -> Option<&Self>

fn get_index(&self, index: usize) -> Option<&Self>

Loading content...

Provided methods

fn is_array(&self) -> bool

fn is_boolean(&self) -> bool

fn is_integer(&self) -> bool

fn is_null(&self) -> bool

fn is_number(&self) -> bool

fn is_object<'json>(&'json self) -> bool where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 

fn is_string(&self) -> bool

fn has_attribute(&self, attribute_name: &str) -> bool

fn get<I: Index<Self>>(&self, index: I) -> Option<&Self>

fn primitive_type<'json>(&'json self) -> EnumJsonType where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 

fn fragment<'json, R: AsRef<str>>(&'json self, fragment: R) -> Option<&Self> where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 

Loading content...

Implementations on Foreign Types

impl JsonType for JsonValue[src]

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

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

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

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

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

fn is_object<'json>(&'json self) -> bool where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

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

fn has_attribute(&self, attribute_name: &str) -> bool[src]

fn get<I: Index<Self>>(&self, index: I) -> Option<&Self>[src]

fn primitive_type<'json>(&'json self) -> EnumJsonType where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

fn fragment<'json, R: AsRef<str>>(&'json self, fragment: R) -> Option<&Self> where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

impl JsonType for Value[src]

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

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

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

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

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

fn is_object<'json>(&'json self) -> bool where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

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

fn get<I: Index<Self>>(&self, index: I) -> Option<&Self>[src]

fn primitive_type<'json>(&'json self) -> EnumJsonType where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

fn fragment<'json, R: AsRef<str>>(&'json self, fragment: R) -> Option<&Self> where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

impl JsonType for Value[src]

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

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

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

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

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

fn is_object<'json>(&'json self) -> bool where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

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

fn get<I: Index<Self>>(&self, index: I) -> Option<&Self>[src]

fn primitive_type<'json>(&'json self) -> EnumJsonType where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

fn fragment<'json, R: AsRef<str>>(&'json self, fragment: R) -> Option<&Self> where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

Loading content...

Implementors

impl JsonType for RustType[src]

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

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

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

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

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

fn is_object<'json>(&'json self) -> bool where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

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

fn has_attribute(&self, attribute_name: &str) -> bool[src]

fn get<I: Index<Self>>(&self, index: I) -> Option<&Self>[src]

fn primitive_type<'json>(&'json self) -> EnumJsonType where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

fn fragment<'json, R: AsRef<str>>(&'json self, fragment: R) -> Option<&Self> where
    JsonMap<'json, Self>: JsonMapTrait<'json, Self>, 
[src]

Loading content...