pub trait Serialize: Sized {
// Required methods
fn encode(&self, dest: &mut Vec<u8>) -> Result<(), EncodeError>;
fn decode(src: &mut Tape<'_, u8>) -> Result<Self, DecodeError>;
}Expand description
A value that can be serialized to and deserialized from a byte buffer.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".