Trait relay_protocol::IntoValue

source ·
pub trait IntoValue: Debug + Empty {
    // Required methods
    fn into_value(self) -> Value
       where Self: Sized;
    fn serialize_payload<S>(
        &self,
        s: S,
        behavior: SkipSerialization,
    ) -> Result<S::Ok, S::Error>
       where Self: Sized,
             S: Serializer;

    // Provided methods
    fn extract_child_meta(&self) -> MetaMap
       where Self: Sized { ... }
    fn extract_meta_tree(value: &Annotated<Self>) -> MetaTree
       where Self: Sized { ... }
}
Expand description

Implemented for all meta structures.

Required Methods§

source

fn into_value(self) -> Value
where Self: Sized,

Boxes the meta structure back into a value.

source

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

Efficiently serializes the payload directly.

Provided Methods§

source

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

Extracts children meta map out of a value.

source

fn extract_meta_tree(value: &Annotated<Self>) -> MetaTree
where Self: Sized,

Extracts the meta tree out of annotated value.

This should not be overridden by implementators, instead extract_child_meta should be provided instead.

Implementations on Foreign Types§

source§

impl IntoValue for bool

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, _behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

source§

impl IntoValue for f64

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, _behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

source§

impl IntoValue for i64

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, _behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

source§

impl IntoValue for u64

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, _behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

source§

impl IntoValue for String

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, _behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

source§

impl IntoValue for Uuid

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, _behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

source§

impl<T1: IntoValue> IntoValue for (Annotated<T1>,)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue, T6: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue, T6: IntoValue, T7: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue, T6: IntoValue, T7: IntoValue, T8: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue, T6: IntoValue, T7: IntoValue, T8: IntoValue, T9: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue, T6: IntoValue, T7: IntoValue, T8: IntoValue, T9: IntoValue, T10: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>, Annotated<T10>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue, T6: IntoValue, T7: IntoValue, T8: IntoValue, T9: IntoValue, T10: IntoValue, T11: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>, Annotated<T10>, Annotated<T11>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T1: IntoValue, T2: IntoValue, T3: IntoValue, T4: IntoValue, T5: IntoValue, T6: IntoValue, T7: IntoValue, T8: IntoValue, T9: IntoValue, T10: IntoValue, T11: IntoValue, T12: IntoValue> IntoValue for (Annotated<T1>, Annotated<T2>, Annotated<T3>, Annotated<T4>, Annotated<T5>, Annotated<T6>, Annotated<T7>, Annotated<T8>, Annotated<T9>, Annotated<T10>, Annotated<T11>, Annotated<T12>)

source§

fn into_value(self) -> Value

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

impl<T> IntoValue for Box<T>
where T: IntoValue,

source§

fn into_value(self) -> Value
where Self: Sized,

source§

fn extract_child_meta(&self) -> MetaMap
where Self: Sized,

source§

fn serialize_payload<S>( &self, s: S, behavior: SkipSerialization, ) -> Result<S::Ok, S::Error>
where Self: Sized, S: Serializer,

Implementors§

source§

impl IntoValue for Value

source§

impl<T> IntoValue for Array<T>
where T: IntoValue,

source§

impl<T> IntoValue for Object<T>
where T: IntoValue,