pub trait Serde<T>: Encoding {
fn from_serde(t: T) -> Self;
fn to_serde(self) -> T;
fn to_value_buf(t: T) -> Result<ValueBuf<Self>, Error> { ... }
}
Expand description
A trait for types wrapping Serde values
Required Methods
sourcefn from_serde(t: T) -> Self
fn from_serde(t: T) -> Self
Wraps a serde-compatible type in a Serde
Provided Methods
sourcefn to_value_buf(t: T) -> Result<ValueBuf<Self>, Error>
fn to_value_buf(t: T) -> Result<ValueBuf<Self>, Error>
Converts a serde-compatible type to ValueBuf
directly