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§
sourcefn into_value(self) -> Valuewhere
Self: Sized,
fn into_value(self) -> Valuewhere
Self: Sized,
Boxes the meta structure back into a value.
sourcefn serialize_payload<S>(
&self,
s: S,
behavior: SkipSerialization,
) -> Result<S::Ok, S::Error>where
Self: Sized,
S: Serializer,
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§
sourcefn extract_child_meta(&self) -> MetaMapwhere
Self: Sized,
fn extract_child_meta(&self) -> MetaMapwhere
Self: Sized,
Extracts children meta map out of a value.
sourcefn extract_meta_tree(value: &Annotated<Self>) -> MetaTreewhere
Self: Sized,
fn extract_meta_tree(value: &Annotated<Self>) -> MetaTreewhere
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.