pub trait Encoder {
type Error;
// Required method
fn encode<W>(
&self,
target: &mut W,
value: &Value,
) -> Result<usize, Self::Error>
where W: Write + WriteBytesExt;
}
Expand description
A schema to serialize a value to bytes.
Required Associated Types§
Required Methods§
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.