tremor_value::prelude::base

Trait ValueIntoContainer

source
pub trait ValueIntoContainer {
    type Array;
    type Object;

    // Required methods
    fn into_array(self) -> Option<Self::Array>;
    fn into_object(self) -> Option<Self::Object>;
}
Expand description

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

Required Associated Types§

source

type Array

The type for Arrays

source

type Object

The type for Objects

Required Methods§

source

fn into_array(self) -> Option<Self::Array>

Tries to turn the value into it’s array representation

source

fn into_object(self) -> Option<Self::Object>

Tries to turn the value into it’s object representation

Implementations on Foreign Types§

source§

impl ValueIntoContainer for Value

source§

impl<'tape, 'input> ValueIntoContainer for Value<'tape, 'input>

source§

type Array = Array<'tape, 'input>

source§

type Object = Object<'tape, 'input>

source§

fn into_array( self, ) -> Option<<Value<'tape, 'input> as ValueIntoContainer>::Array>

source§

fn into_object( self, ) -> Option<<Value<'tape, 'input> as ValueIntoContainer>::Object>

source§

impl<'value> ValueIntoContainer for Value<'value>

source§

type Array = Vec<Value<'value>>

source§

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

source§

fn into_array(self) -> Option<<Value<'value> as ValueIntoContainer>::Array>

source§

fn into_object(self) -> Option<<Value<'value> as ValueIntoContainer>::Object>

source§

impl<V> ValueIntoContainer for Option<V>

source§

impl<V, E> ValueIntoContainer for Result<V, E>

Implementors§

source§

impl<'value> ValueIntoContainer for tremor_value::value::Value<'value>

source§

type Array = Vec<Value<'value>>

source§

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