simd_json::prelude::base

Trait ValueAsObject

Source
pub trait ValueAsObject {
    type Object: Object;

    // Required method
    fn as_object(&self) -> Option<&Self::Object>;
}
Expand description

Trait to allow Value as an object

Required Associated Types§

Source

type Object: Object

The object structure

Required Methods§

Source

fn as_object(&self) -> Option<&Self::Object>

Tries to represent the value as an object and returns a reference to it

Implementations on Foreign Types§

Source§

impl<V> ValueAsObject for Option<V>
where V: ValueAsObject,

Source§

impl<V> ValueAsObject for &V
where V: ValueAsObject,

Source§

impl<V, E> ValueAsObject for Result<V, E>
where V: ValueAsObject,

Implementors§

Source§

impl ValueAsObject for simd_json::owned::Value

Source§

impl<'value> ValueAsObject for simd_json::borrowed::Value<'value>

Source§

type Object = SizedHashMap<Cow<'value, str>, Value<'value>>