flat_message_proc_macro 0.2.1

Procedural macros for the FlatMessage serialization library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub enum ValidateChecksum {
    Always,
    Auto,
    Ignore,
}
impl ValidateChecksum {
    pub fn from_str(s: &str) -> Self {
        match s {
            "always" => Self::Always,
            "auto" => Self::Auto,
            "ignore" => Self::Ignore,
            _ => panic!("Invalid checksum validation mode ('{s}'). Allowed values are 'always', 'auto' or 'ignore' !"),
        }
    }
}