Skip to main content

ValueSerialize

Trait ValueSerialize 

Source
pub trait ValueSerialize {
    // Required methods
    fn to_typed(&self) -> Result<TypedValue, SerializeError>;
    fn to_bytes(&self) -> Result<Vec<u8>, SerializeError>;
}
Expand description

Extension trait for Value to add serialization methods

Required Methods§

Source

fn to_typed(&self) -> Result<TypedValue, SerializeError>

Convert to serializable TypedValue

Source

fn to_bytes(&self) -> Result<Vec<u8>, SerializeError>

Serialize directly to bytes

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§