Trait rok::middleware::Middleware[][src]

pub trait Middleware: 'static + Send + Sync {
#[must_use]    fn handle<'a, 'async_trait>(
        &'a self,
        req: Request,
        next: Next<'a>
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        Self: 'async_trait
; fn name(&self) -> &str { ... } }

Required methods

#[must_use]fn handle<'a, 'async_trait>(
    &'a self,
    req: Request,
    next: Next<'a>
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>> where
    'a: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Provided methods

fn name(&self) -> &str[src]

Loading content...

Implementors

impl Middleware for AccessLog[src]

impl Middleware for DefaultHeaders[src]

impl Middleware for RequestId[src]

impl<F, Fut> Middleware for F where
    F: Fn(Request, Next<'_>) -> Fut + Send + Sync + 'static,
    Fut: Future<Output = Response> + Send + 'static, 
[src]

impl<T: Send + Sync + 'static + Clone> Middleware for WithState<T>[src]

Loading content...