pub trait Command {
const MAX_LENGTH: usize;
// Required method
fn to_bytes<'a>(
&self,
buffer: &'a mut [u8],
) -> Result<&'a [u8], SerializationError>;
}Expand description
The core trait for any object that can be serialized into an II-compatible byte message.
Required Associated Constants§
Sourceconst MAX_LENGTH: usize
const MAX_LENGTH: usize
The maximum number of bytes this command could possibly serialize to. This helps the user create a buffer of the correct size.
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.