protobuf-codegen 3.7.2

Code generator for rust-protobuf. Includes a library to invoke programmatically (e. g. from `build.rs`) and `protoc-gen-rs` binary.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::customize::Customize;
use crate::gen::rust::path::RustPath;

/// Path to `protobuf` crate, different when `.proto` file is
/// used inside or outside of protobuf crate.
pub(crate) fn protobuf_crate_path(customize: &Customize) -> RustPath {
    match customize.inside_protobuf {
        Some(true) => RustPath::from("crate"),
        _ => RustPath::from("::protobuf"),
    }
}