aversion 0.2.1

Versioned data structures with auto-upgrading
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Versioned;

/// 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).
pub trait MessageId: Versioned {
    /// 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.
    const MSG_ID: u16;
}