[−][src]Trait tide::Middleware
Middleware that wraps around remaining middleware chain.
Required methods
fn handle<'a>(
&'a self,
cx: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'a>>
&'a self,
cx: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'a>>
Asynchronously handle the request, and return a response.
Implementors
impl<State, F> Middleware<State> for F where
F: Send + Sync + 'static + for<'a> Fn(Request<State>, Next<'a, State>) -> Pin<Box<dyn Future<Output = Response> + Send + 'a>>,
[src]
F: Send + Sync + 'static + for<'a> Fn(Request<State>, Next<'a, State>) -> Pin<Box<dyn Future<Output = Response> + Send + 'a>>,
fn handle<'a>(
&'a self,
req: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'a>>
[src]
&'a self,
req: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'a>>
impl<State: Send + Sync + 'static> Middleware<State> for Cors
[src]
fn handle<'a>(
&'a self,
req: Request<State>,
next: Next<'a, State>
) -> BoxFuture<'a, Response>
[src]
&'a self,
req: Request<State>,
next: Next<'a, State>
) -> BoxFuture<'a, Response>