Trait simd_json::value::prelude::ValueAsMutContainer

source ·
pub trait ValueAsMutContainer {
    type Array;
    type Object;

    // Required methods
    fn as_array_mut(&mut self) -> Option<&mut Self::Array>;
    fn as_object_mut(&mut self) -> Option<&mut Self::Object>;
}
Expand description

Mutatability for container values

Required Associated Types§

source

type Array

The type for Arrays

source

type Object

The type for Objects

Required Methods§

source

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

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

source

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

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

Implementors§

source§

impl ValueAsMutContainer for simd_json::value::owned::Value

source§

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

source§

type Array = Vec<Value<'value>>

source§

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