1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use serde::Serialize;

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize)]
pub struct Message {
    pub camelcase_name: &'static str,
    pub fields: &'static [&'static MessageField],
    pub comment: &'static [&'static str],
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize)]
pub struct MessageField {
    pub snakecase_name: &'static str,
    pub field_type: MessageFieldType,
    pub comment: &'static [&'static str],
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize)]
pub enum MessageFieldType {
    Str,
    Byte,
}