pub trait MessageData: Sized {
type Message: Message;
const ID: u32;
const NAME: &'static str;
const EXTRA_CRC: u8;
const ENCODED_LEN: usize;
// Required methods
fn ser(&self, version: MavlinkVersion, payload: &mut [u8]) -> usize;
fn deser(
version: MavlinkVersion,
payload: &[u8],
) -> Result<Self, ParserError>;
}
Required Associated Constants§
const ID: u32
const NAME: &'static str
const EXTRA_CRC: u8
const ENCODED_LEN: usize
Required Associated Types§
Required Methods§
fn ser(&self, version: MavlinkVersion, payload: &mut [u8]) -> usize
fn deser(version: MavlinkVersion, payload: &[u8]) -> Result<Self, ParserError>
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.