tonic_middleware/
lib.rs

1pub use middleware::Middleware;
2pub use middleware::MiddlewareFor;
3pub use middleware::MiddlewareLayer;
4pub use request_interceptor::InterceptorFor;
5pub use request_interceptor::RequestInterceptor;
6pub use request_interceptor::RequestInterceptorLayer;
7
8use tonic::body::Body;
9use tonic::codegen::http::{Request, Response};
10use tonic::codegen::Service;
11
12mod middleware;
13mod request_interceptor;
14
15pub trait ServiceBound:
16    Service<Request<Body>, Response = Response<Body>> + Send + Clone + 'static
17{
18}
19
20impl<T> ServiceBound for T where
21    T: Service<Request<Body>, Response = Response<Body>> + Send + Clone + 'static
22{
23}