protobuf_parse/
which_parser.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Which parse to use to parse `.proto` files.
#[derive(Debug, Copy, Clone)]
pub(crate) enum WhichParser {
    /// Pure Rust parser implemented by this crate.
    Pure,
    /// Parse `.proto` files using `protoc --descriptor_set_out=...` command.
    Protoc,
}

impl Default for WhichParser {
    fn default() -> Self {
        WhichParser::Pure
    }
}