Trait xwt_core::traits::Request

source ·
pub trait Request: Send {
    type Connection: Send;
    type OkError: Error + Send + Sync + 'static;
    type CloseError: Error + Send + Sync + 'static;

    // Required methods
    fn ok<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::OkError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn close<'async_trait>(
        self,
        status: u16
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::CloseError>> + Send + 'async_trait>>
       where Self: 'async_trait;
}

Required Associated Types§

source

type Connection: Send

source

type OkError: Error + Send + Sync + 'static

source

type CloseError: Error + Send + Sync + 'static

Required Methods§

source

fn ok<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::OkError>> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn close<'async_trait>( self, status: u16 ) -> Pin<Box<dyn Future<Output = Result<(), Self::CloseError>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§