Trait MessageId

Source
pub trait MessageId: Versioned {
    const MSG_ID: u16;
}
Expand description

Trait for data structures with a message type number.

Each data structure that has a message type may be deserialized from a context-free buffer (e.g. a file or network socket).

Required Associated Constants§

Source

const MSG_ID: u16

The message id.

This is a constant that identifies this message when it is serialized. The same id will be used for all versions of this message type.

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§