simd_json::base

Trait ValueAsArray

Source
pub trait ValueAsArray {
    type Array: Array;

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

Trait to allow accessing data inside a Value

Required Associated Types§

Source

type Array: Array

The array structure

Required Methods§

Source

fn as_array(&self) -> Option<&Self::Array>

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

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl ValueAsArray for simd_json::owned::Value

Source§

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

Source§

type Array = Vec<Value<'value>>