1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
mod protobuf;
mod rpc;
pub mod serde;

/// Includes generated protobuf code.
/// Base path is specified with `OUT_DIR` environment variable.
#[macro_export]
macro_rules! include_proto {
    ($package: tt) => {
        include!(concat!(env!("OUT_DIR"), concat!("/", $package, ".rs")));
    };
}

/// Includes generated protobuf file descriptor set.
#[macro_export]
macro_rules! include_file_descriptor_set {
    () => {
        include_file_descriptor_set!("fd");
    };
    ($name:tt) => {
        include_bytes!(concat!(env!("OUT_DIR"), concat!("/", $name, ".fd")));
    };
}

#[allow(unused_qualifications, clippy::all, clippy::pedantic)]
pub mod google {
    pub mod protobuf {
        pub use super::super::protobuf::*;
        crate::include_proto!("google.protobuf");
        crate::include_proto!("google.protobuf.plus");
    }
    pub mod rpc {
        pub use super::super::rpc::*;
        crate::include_proto!("google.rpc");
        crate::include_proto!("google.rpc.plus");
    }
}