Skip to main content

JsonValueWrap

Trait JsonValueWrap 

Source
pub trait JsonValueWrap
where Self: Sized,
{ // Required methods fn as_boolean(&self) -> Option<&bool>; fn as_array(&self) -> Option<&Vec<Self>>; fn as_string(&self) -> Option<&String>; fn as_object(&self) -> Option<&Map<String, Self>>; fn into_boolean(self) -> Option<bool>; fn into_string(self) -> Option<String>; fn into_array(self) -> Option<Vec<Self>>; fn into_object(self) -> Option<Map<String, Self>>; }
Expand description

Attempt to convert json value to specified type

Required Methods§

Source

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

Source

fn as_array(&self) -> Option<&Vec<Self>>

Source

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

Source

fn as_object(&self) -> Option<&Map<String, Self>>

Source

fn into_boolean(self) -> Option<bool>

Source

fn into_string(self) -> Option<String>

Source

fn into_array(self) -> Option<Vec<Self>>

Source

fn into_object(self) -> Option<Map<String, Self>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl JsonValueWrap for Value

Implementors§