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§
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
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.