[−][src]Trait tide::Middleware
Middleware that wraps around the remaining middleware chain.
Required methods
fn handle<'a>(
&'a self,
request: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
&'a self,
request: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
Asynchronously handle the request, and return a response.
Provided methods
Loading content...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 = Result> + Send + 'a>>,
[src]
F: Send + Sync + 'static + for<'a> Fn(Request<State>, Next<'a, State>) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>,
fn handle<'a>(
&'a self,
req: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
[src]
&'a self,
req: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
impl<State, F, Fut> Middleware<State> for After<F> where
State: Send + Sync + 'static,
F: Fn(Result) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result> + Send + Sync,
[src]
State: Send + Sync + 'static,
F: Fn(Result) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result> + Send + Sync,
fn handle<'a>(
&'a self,
request: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
[src]
&'a self,
request: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
impl<State, F, Fut> Middleware<State> for Before<F> where
State: Send + Sync + 'static,
F: Fn(Request<State>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Request<State>> + Send + Sync,
[src]
State: Send + Sync + 'static,
F: Fn(Request<State>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Request<State>> + Send + Sync,
fn handle<'a>(
&'a self,
request: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
[src]
&'a self,
request: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
impl<State: Send + Sync + 'static> Middleware<State> for LogMiddleware
[src]
fn handle<'a>(
&'a self,
ctx: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>
[src]
&'a self,
ctx: Request<State>,
next: Next<'a, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>