Skip to main content

RecordCodec

Trait RecordCodec 

Source
pub trait RecordCodec: Serialize + DeserializeOwned {
    // Provided methods
    fn to_body(&self) -> Result<Body> { ... }
    fn from_body(body: &Body) -> Result<Self> { ... }
}
Expand description

A typed value that can be stored in a record body as JSON.

Provided Methods§

Source

fn to_body(&self) -> Result<Body>

Source

fn from_body(body: &Body) -> Result<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§