[−][src]Trait surf::middleware::Middleware
Middleware that wraps around remaining middleware chain.
Required methods
fn handle<'a>(
&'a self,
req: Request,
client: C,
next: Next<'a, C>
) -> BoxFuture<'a, Result<Response, Exception>>
&'a self,
req: Request,
client: C,
next: Next<'a, C>
) -> BoxFuture<'a, Result<Response, Exception>>
Asynchronously handle the request, and return a response.
Implementors
impl<F, C: HttpClient> Middleware<C> for F where
F: Send + Sync + 'static + for<'a> Fn(Request, C, Next<'a, C>) -> BoxFuture<'a, Result<Response, Exception>>,
[src]
F: Send + Sync + 'static + for<'a> Fn(Request, C, Next<'a, C>) -> BoxFuture<'a, Result<Response, Exception>>,