[−][src]Trait surf::middleware::Middleware
Middleware that wraps around remaining middleware chain.
Required methods
#[must_use]fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Asynchronously handle the request, and return a response.
Implementors
impl Middleware for Logger
[src]
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl Middleware for Redirect
[src]
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<F> Middleware for F where
F: Send + Sync + 'static + for<'a> Fn(Request, Client, Next<'a>) -> BoxFuture<'a, Result<Response>>,
[src]
F: Send + Sync + 'static + for<'a> Fn(Request, Client, Next<'a>) -> BoxFuture<'a, Result<Response>>,