Skip to main content

ImplCommandMsg

Trait ImplCommandMsg 

Source
pub trait ImplCommandMsg: Sized {
    const CMD_ID: u16;
    const PAYLOAD_SIZE: u16;
}
Expand description

Provides the command ID and payload size constants for a message type.

This trait is a sub-trait of Marshaler and is automatically implemented for any type that implements Marshaler. It can also be implemented directly when only the metadata constants are needed.

Required Associated Constants§

Source

const CMD_ID: u16

See Marshaler::CMD_ID for details.

Source

const PAYLOAD_SIZE: u16

See Marshaler::PAYLOAD_SIZE for details.

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.

Implementors§

Source§

impl<T: Marshaler> ImplCommandMsg for T

Source§

const CMD_ID: u16 = T::CMD_ID

Source§

const PAYLOAD_SIZE: u16 = T::PAYLOAD_SIZE