Skip to main content

Type

Trait Type 

Source
pub trait Type {
    // Required method
    fn type_id(&self) -> u16;
}
Expand description

Defines a type identifier for sending messages over the wire.

Messages implementing this trait specify a type and must be [Writeable].

Required Methods§

Source

fn type_id(&self) -> u16

Returns the type identifying the message payload.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Type for ()

Source§

fn type_id(&self) -> u16

Implementors§

Source§

impl Type for CommandoCommand

Source§

impl Type for IncomingCommandoMessage

Source§

impl<T: Debug + Type> Type for Message<T>

Source§

impl<T: Encode + Debug + Writeable> Type for T