[][src]Trait json_trait_rs::JsonType

pub trait JsonType: JsonTypeToString + ToRustType {
    fn as_array<'json>(
        &'json self
    ) -> Option<Box<dyn ExactSizeIterator<Item = &Self> + 'json>>
    where
        Self: Sized
;
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(&self) -> Option<JsonMap<Self>>
    where
        Self: Sized
;
fn as_string(&self) -> Option<&str>;
fn get_attribute(&self, attribute_name: &str) -> Option<&Self>
    where
        Self: Sized
;
fn get_index(&self, index: usize) -> Option<&Self>
    where
        Self: Sized
; fn is_array(&self) -> bool
    where
        Self: Sized
, { ... }
fn is_boolean(&self) -> bool { ... }
fn is_integer(&self) -> bool { ... }
fn is_null(&self) -> bool { ... }
fn is_number(&self) -> bool { ... }
fn is_object(&self) -> bool
    where
        Self: Sized
, { ... }
fn is_string(&self) -> bool { ... }
fn has_attribute(&self, attribute_name: &str) -> bool
    where
        Self: Sized
, { ... }
fn primitive_type(&self) -> PrimitiveType
    where
        Self: Sized
, { ... } }

Required methods

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

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(&self) -> Option<JsonMap<Self>> where
    Self: Sized

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

fn get_attribute(&self, attribute_name: &str) -> Option<&Self> where
    Self: Sized

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

Loading content...

Provided methods

fn is_array(&self) -> bool where
    Self: Sized

fn is_boolean(&self) -> bool

fn is_integer(&self) -> bool

fn is_null(&self) -> bool

fn is_number(&self) -> bool

fn is_object(&self) -> bool where
    Self: Sized

fn is_string(&self) -> bool

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

fn primitive_type(&self) -> PrimitiveType where
    Self: Sized

Loading content...

Implementations on Foreign Types

impl JsonType for JsonValue[src]

impl JsonType for PyAny[src]

impl JsonType for Value[src]

impl JsonType for Value[src]

Loading content...

Implementors

impl JsonType for RustType[src]

Loading content...