Trait RequestHandler

Source
pub trait RequestHandler<C>
where C: CommunicableTypes, C::Resp: ErrorSubset, Self: MatchResponse<C::Req>,
{ type GlobalContext; type SessionContext; // Required method fn handle( request: Self, global_context: Arc<Self::GlobalContext>, session_context: Arc<RwLock<Self::SessionContext>>, ) -> impl Future<Output = Result<<Self as MatchResponse<C::Req>>::Resp, impl Into<<C::Resp as ErrorSubset>::Error>>> + Send; }

Required Associated Types§

Required Methods§

Source

fn handle( request: Self, global_context: Arc<Self::GlobalContext>, session_context: Arc<RwLock<Self::SessionContext>>, ) -> impl Future<Output = Result<<Self as MatchResponse<C::Req>>::Resp, impl Into<<C::Resp as ErrorSubset>::Error>>> + 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§