pub trait PayloadDef<'a>: Parse<'a, Error = Error> {
const PACKET_TYPE: u8;
const NAME: &'static str;
}Expand description
Implemented by every typed T2-MI payload; drives
crate::payload::AnyPayload dispatch.
PACKET_TYPE is the wire packet_type byte from the T2-MI header that
this type parses. NAME is a diagnostic label in SCREAMING_SNAKE convention
without any _payload suffix.
Required Associated Constants§
Sourceconst PACKET_TYPE: u8
const PACKET_TYPE: u8
Wire packet_type byte (TS 102 773 Table 1) this type accepts.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".