Request

Trait Request 

Source
pub trait Request: Send {
    type Session: Send;
    type OkError: Error + Send + Sync + 'static;
    type CloseError: Error + Send + Sync + 'static;

    // Required methods
    fn ok(
        self,
    ) -> impl Future<Output = Result<Self::Session, Self::OkError>> + Send;
    fn close(
        self,
        status: u16,
    ) -> impl Future<Output = Result<(), Self::CloseError>> + Send;
}

Required Associated Types§

Source

type Session: Send

Source

type OkError: Error + Send + Sync + 'static

Source

type CloseError: Error + Send + Sync + 'static

Required Methods§

Source

fn ok(self) -> impl Future<Output = Result<Self::Session, Self::OkError>> + Send

Source

fn close( self, status: u16, ) -> impl Future<Output = Result<(), Self::CloseError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§