Skip to main content

Value

Trait Value 

Source
pub trait Value<T> {
    // Required method
    fn serialize_value(data: &T) -> Result<Cow<'_, str>>;
}
Expand description

Trait to serialize attributes and inner text

This is implemented my “marker” types to decide how to serialize a type (the same type can be serialized differently depending on the marker type)

Required Methods§

Source

fn serialize_value(data: &T) -> Result<Cow<'_, str>>

Serialize value to text

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§