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
#![doc(html_root_url = "https://docs.rs/tower-grpc/0.1.1")]
#![deny(missing_debug_implementations, rust_2018_idioms)]
// TODO: enable when there actually are docs
// #![deny(missing_docs)]
#![cfg_attr(test, deny(warnings))]

//! gRPC client and server implementation based on Tower.

pub mod client;
pub mod generic;
pub mod metadata;

mod body;
mod error;
mod request;
mod response;
mod status;

pub use crate::body::{Body, BoxBody};
pub use crate::request::Request;
pub use crate::response::Response;
pub use crate::status::{Code, Status};

#[cfg(feature = "protobuf")]
pub mod server;

/// Type re-exports used by generated code
#[cfg(feature = "protobuf")]
pub mod codegen;

#[cfg(feature = "protobuf")]
mod codec;

#[cfg(feature = "protobuf")]
pub use crate::codec::{Encode, Streaming};