prost-build 0.14.3

Generate Prost annotated Rust types from Protocol Buffers files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(PartialEq)]
pub(super) enum Syntax {
    Proto2,
    Proto3,
}
impl From<Option<&str>> for Syntax {
    fn from(optional_str: Option<&str>) -> Self {
        match optional_str {
            None | Some("proto2") => Syntax::Proto2,
            Some("proto3") => Syntax::Proto3,
            Some(s) => panic!("unknown syntax: {s}"),
        }
    }
}