[][src]Trait tide::middleware::Middleware

pub trait Middleware<AppData>: 'static + Send + Sync {
    fn handle<'a>(
        &'a self,
        cx: Context<AppData>,
        next: Next<'a, AppData>
    ) -> BoxFuture<'a, Response>; }

Middleware that wraps around remaining middleware chain.

Required methods

fn handle<'a>(
    &'a self,
    cx: Context<AppData>,
    next: Next<'a, AppData>
) -> BoxFuture<'a, Response>

Asynchronously handle the request, and return a response.

Loading content...

Implementors

impl<Data, F> Middleware<Data> for F where
    F: Send + Sync + 'static + for<'a> Fn(Context<Data>, Next<'a, Data>) -> BoxFuture<'a, Response>, 
[src]

impl<Data: Send + Sync + 'static> Middleware<Data> for CookiesMiddleware[src]

impl<Data: Send + Sync + 'static> Middleware<Data> for DefaultHeaders[src]

impl<Data: Send + Sync + 'static> Middleware<Data> for RootLogger[src]

Stores information during request phase and logs information once the response is generated.

Loading content...