tower_grpc/
codegen.rs

1/// Type re-exports used by generated server code
2pub mod server {
3    /// Re-export types from this crate
4    pub mod grpc {
5        pub use crate::codec::{Encode, Streaming};
6        pub use crate::generic::server::{
7            ClientStreamingService, ServerStreamingService, StreamingService, UnaryService,
8        };
9        pub use crate::server::{
10            client_streaming, server_streaming, streaming, unary, unimplemented,
11        };
12        pub use crate::{error::Never, Body, BoxBody, Code, Request, Response, Status};
13    }
14
15    /// Re-export types from the `future` crate.
16    pub mod futures {
17        pub use futures::future::{ok, FutureResult};
18        pub use futures::{Async, Future, Poll, Stream};
19    }
20
21    /// Re-exported types from the `http` crate.
22    pub mod http {
23        pub use http::{HeaderMap, Request, Response};
24    }
25
26    /// Re-exported types from the `tower` crate.
27    pub mod tower {
28        pub use http_body::Body as HttpBody;
29        pub use tower_service::Service;
30        pub use tower_util::MakeService;
31    }
32
33    #[cfg(feature = "tower-hyper")]
34    /// Re-exported types from `tower-hyper` crate.
35    pub mod tower_hyper {
36        pub use tower_hyper::Body;
37    }
38}
39
40pub mod client {
41    /// Re-export types from this crate
42    pub mod grpc {
43        pub use crate::client::{
44            client_streaming, server_streaming, streaming, unary, Encodable, Grpc,
45        };
46        pub use crate::generic::client::GrpcService;
47        pub use crate::{Body, Code, Request, Response, Status};
48    }
49
50    pub mod http {
51        pub use http::uri::{PathAndQuery, Uri};
52    }
53
54    /// Re-export types from the `future` crate.
55    pub mod futures {
56        pub use futures::{Future, Poll, Stream};
57    }
58
59    pub mod tower {
60        pub use http_body::Body as HttpBody;
61    }
62}