aversion/
id.rs

1use crate::Versioned;
2
3/// Trait for data structures with a message type number.
4///
5/// Each data structure that has a message type may be deserialized
6/// from a context-free buffer (e.g. a file or network socket).
7pub trait MessageId: Versioned {
8    /// The message id.
9    ///
10    /// This is a constant that identifies this message when it is
11    /// serialized. The same id will be used for all versions of
12    /// this message type.
13    const MSG_ID: u16;
14}