xref: /tonic/tonic-reflection/src/lib.rs (revision 03b4735b)
1 //! A `tonic` based gRPC Server Reflection implementation.
2 
3 #![warn(
4     missing_debug_implementations,
5     missing_docs,
6     rust_2018_idioms,
7     unreachable_pub
8 )]
9 #![doc(
10     html_logo_url = "https://github.com/hyperium/tonic/raw/master/.github/assets/tonic-docs.png"
11 )]
12 #![deny(rustdoc::broken_intra_doc_links)]
13 #![doc(html_root_url = "https://docs.rs/tonic-reflection/0.6.0")]
14 #![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
15 #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
16 #![cfg_attr(docsrs, feature(doc_cfg))]
17 
18 /// Generated protobuf types from the `grpc.reflection.v1alpha` package.
19 pub mod proto {
20     #![allow(unreachable_pub)]
21     #![allow(missing_docs)]
22     #![allow(rustdoc::invalid_html_tags)]
23     include!("generated/grpc.reflection.v1alpha.rs");
24 
25     pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("generated/reflection_v1alpha1.bin");
26 
27     #[cfg(test)]
28     mod tests {
29         use super::FILE_DESCRIPTOR_SET;
30         use prost::Message as _;
31 
32         #[test]
33         fn file_descriptor_set_is_valid() {
34             prost_types::FileDescriptorSet::decode(FILE_DESCRIPTOR_SET).unwrap();
35         }
36     }
37 }
38 
39 /// Implementation of the server component of gRPC Server Reflection.
40 pub mod server;
41