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>>