pub trait Codable: Sized {
// Required methods
fn encode(&self) -> u16;
fn decode(value: u16, mode: Mode) -> Option<Self>;
}
Expand description
Trait which allows for the encoding and decoding of instructions and portions thereof. This trait can only be implemented if it is impossible for the encoding of the implementing type to fail.
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.