Skip to main content

RequestHandler

Trait RequestHandler 

Source
pub trait RequestHandler: Sync + Send {
    // Required methods
    fn handle_jmap_request<'x>(
        &self,
        request: Request<'x>,
        access_token: Arc<AccessToken>,
        session: &HttpSessionData,
    ) -> impl Future<Output = Response<'x>> + Send;
    fn handle_method_call<'x>(
        &self,
        method: RequestMethod<'x>,
        method_name: MethodName,
        access_token: &AccessToken,
        next_call: &mut Option<Call<RequestMethod<'x>>>,
        session: &HttpSessionData,
    ) -> impl Future<Output = Result<ResponseMethod<'x>>> + Send;
}

Required Methods§

Source

fn handle_jmap_request<'x>( &self, request: Request<'x>, access_token: Arc<AccessToken>, session: &HttpSessionData, ) -> impl Future<Output = Response<'x>> + Send

Source

fn handle_method_call<'x>( &self, method: RequestMethod<'x>, method_name: MethodName, access_token: &AccessToken, next_call: &mut Option<Call<RequestMethod<'x>>>, session: &HttpSessionData, ) -> impl Future<Output = Result<ResponseMethod<'x>>> + 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§