Trait simd_json::prelude::derived::ValueTryIntoContainer

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

    // Required methods
    fn try_into_array(self) -> Result<Self::Array, TryTypeError>;
    fn try_into_object(self) -> Result<Self::Object, TryTypeError>;
}
Expand description

A trait that specifies how to turn the Value into it’s sub types with error handling

Required Associated Types§

source

type Array

The type for Arrays

source

type Object

The type for Objects

Required Methods§

source

fn try_into_array(self) -> Result<Self::Array, TryTypeError>

Tries to turn the value into it’s array representation

§Errors

if the requested type doesn’t match the actual type

source

fn try_into_object(self) -> Result<Self::Object, TryTypeError>

Tries to turn the value into it’s object representation

§Errors

if the requested type doesn’t match the actual type

Implementors§