pub trait FormatEncoder<V: ?Sized> {
type EncodeError;
// Required method
fn encode(
&mut self,
writer: impl Write,
value: &V,
) -> Result<(), Self::EncodeError>;
}Expand description
A trait for encoding values of type V into a specific format
Required Associated Types§
Sourcetype EncodeError
type EncodeError
The error type that can occur during encoding
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.