[−][src]Trait tower_web::util::http::HttpMiddleware
HTTP middleware trait
A trait "alias" for Middleware
where the yielded service is an
HttpService
.
Using HttpMiddleware
in where bounds is easier than trying to use Middleware
directly.
Associated Types
type RequestBody: BufStream
The HTTP request body handled by the wrapped service.
type ResponseBody: BufStream
The HTTP response body returned by the wrapped service.
type Error
The wrapped service's error type.
type Service: HttpService<RequestBody = Self::RequestBody, ResponseBody = Self::ResponseBody, Error = Self::Error>
The wrapped service.
Required methods
fn wrap_http(&self, inner: S) -> Self::Service
Wrap the given service with the middleware, returning a new servicee that has been decorated with the middleware.
Implementors
impl<T, S, B1, B2> HttpMiddleware<S> for T where
T: Middleware<S, Request = Request<B1>, Response = Response<B2>>,
B1: BufStream,
B2: BufStream,
[src]
T: Middleware<S, Request = Request<B1>, Response = Response<B2>>,
B1: BufStream,
B2: BufStream,