[−][src]Trait tide::Middleware
Middleware that wraps around the remaining middleware chain.
Required methods
#[must_use]fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
request: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Asynchronously handle the request, and return a response.
Provided methods
Loading content...Implementors
impl<State, F> Middleware<State> for F where
State: Clone + Send + Sync + 'static,
F: Send + Sync + 'static + for<'a> Fn(Request<State>, Next<'a, State>) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>,
[src]
State: Clone + Send + Sync + 'static,
F: Send + Sync + 'static + for<'a> Fn(Request<State>, Next<'a, State>) -> Pin<Box<dyn Future<Output = Result> + Send + 'a>>,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
req: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<State, F, Fut> Middleware<State> for After<F> where
State: Clone + Send + Sync + 'static,
F: Fn(Response) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result> + Send + Sync + 'static,
[src]
State: Clone + Send + Sync + 'static,
F: Fn(Response) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result> + Send + Sync + 'static,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
request: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<State, F, Fut> Middleware<State> for Before<F> where
State: Clone + Send + Sync + 'static,
F: Fn(Request<State>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Request<State>> + Send + Sync + 'static,
[src]
State: Clone + Send + Sync + 'static,
F: Fn(Request<State>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Request<State>> + Send + Sync + 'static,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
request: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<State: Clone + Send + Sync + 'static> Middleware<State> for LogMiddleware
[src]
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
req: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<State: Clone + Send + Sync + 'static> Middleware<State> for CorsMiddleware
[src]
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
req: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<Store, State> Middleware<State> for SessionMiddleware<Store> where
Store: SessionStore,
State: Clone + Send + Sync + 'static,
[src]
Store: SessionStore,
State: Clone + Send + Sync + 'static,