[][src]Trait valor_core::RequestHandler

pub trait RequestHandler {
#[must_use]    fn handle_request<'life0, 'async_trait>(
        &'life0 self,
        request: Request
    ) -> Pin<Box<dyn Future<Output = Response> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Request handlers only job is to respond to http requests

Required methods

#[must_use]fn handle_request<'life0, 'async_trait>(
    &'life0 self,
    request: Request
) -> Pin<Box<dyn Future<Output = Response> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles the request

Loading content...

Implementations on Foreign Types

impl RequestHandler for ()[src]

A dummy handler

fn handle_request<'life0, 'async_trait>(
    &'life0 self,
    _request: Request
) -> Pin<Box<dyn Future<Output = Response> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles the request

Loading content...

Implementors

impl<F, R> RequestHandler for F where
    F: Fn(Request) -> R,
    R: Future<Output = Response> + 'static, 
[src]

Loading content...