[][src]Trait mendes::route::Application

pub trait Application: Sized {
    type RequestBody;
    type ResponseBody;
    type Error: From<ClientError>;
    fn handle<'async_trait>(
        cx: Context<Self>
    ) -> Pin<Box<dyn Future<Output = Response<Self::ResponseBody>> + Send + 'async_trait>>
    where
        Self: 'async_trait
;
fn error(&self, error: Self::Error) -> Response<Self::ResponseBody>; }

Associated Types

Loading content...

Required methods

fn handle<'async_trait>(
    cx: Context<Self>
) -> Pin<Box<dyn Future<Output = Response<Self::ResponseBody>> + Send + 'async_trait>> where
    Self: 'async_trait, 

fn error(&self, error: Self::Error) -> Response<Self::ResponseBody>

Loading content...

Implementors

Loading content...