pub trait TypeCodec {
// Required methods
fn encode(&self, writer: &mut impl Write) -> Result<(), CodecError>;
fn decode(reader: &mut impl Read) -> Result<Self, CodecError>
where Self: Sized;
}Expand description
Encodes and decodes a value with a context-independent wire representation.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".