Skip to main content

RumaHandler

Trait RumaHandler 

Source
pub(crate) trait RumaHandler<T> {
    // Required methods
    fn add_route(
        &'static self,
        router: Router<State>,
        path: &str,
    ) -> Router<State>;
    fn add_routes(&'static self, router: Router<State>) -> Router<State>;
}

Required Methods§

Source

fn add_route(&'static self, router: Router<State>, path: &str) -> Router<State>

Source

fn add_routes(&'static self, router: Router<State>) -> Router<State>

Implementors§

Source§

impl<Err, Req, Fut, Fun> RumaHandler<(Args<Req>,)> for Fun
where Fun: Fn(Ruma<Req>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Req::OutgoingResponse, Err>> + Send, Req: IncomingRequest + Debug + Send + Sync + 'static, Req::Authentication: AuthDispatch, Err: IntoResponse + Debug + Send, <Req as IncomingRequest>::OutgoingResponse: Debug + Send,

Source§

impl<Err, Req, Fut, Fun, T1> RumaHandler<(T1, Args<Req>)> for Fun
where Fun: Fn(T1, Ruma<Req>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Req::OutgoingResponse, Err>> + Send, Req: IncomingRequest + Debug + Send + Sync + 'static, Req::Authentication: AuthDispatch, Err: IntoResponse + Debug + Send, <Req as IncomingRequest>::OutgoingResponse: Debug + Send, T1: FromRequestParts<State> + Send + Sync + 'static,

Source§

impl<Err, Req, Fut, Fun, T1, T2> RumaHandler<(T1, T2, Args<Req>)> for Fun
where Fun: Fn(T1, T2, Ruma<Req>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Req::OutgoingResponse, Err>> + Send, Req: IncomingRequest + Debug + Send + Sync + 'static, Req::Authentication: AuthDispatch, Err: IntoResponse + Debug + Send, <Req as IncomingRequest>::OutgoingResponse: Debug + Send, T1: FromRequestParts<State> + Send + Sync + 'static, T2: FromRequestParts<State> + Send + Sync + 'static,

Source§

impl<Err, Req, Fut, Fun, T1, T2, T3> RumaHandler<(T1, T2, T3, Args<Req>)> for Fun
where Fun: Fn(T1, T2, T3, Ruma<Req>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Req::OutgoingResponse, Err>> + Send, Req: IncomingRequest + Debug + Send + Sync + 'static, Req::Authentication: AuthDispatch, Err: IntoResponse + Debug + Send, <Req as IncomingRequest>::OutgoingResponse: Debug + Send, T1: FromRequestParts<State> + Send + Sync + 'static, T2: FromRequestParts<State> + Send + Sync + 'static, T3: FromRequestParts<State> + Send + Sync + 'static,

Source§

impl<Err, Req, Fut, Fun, T1, T2, T3, T4> RumaHandler<(T1, T2, T3, T4, Args<Req>)> for Fun
where Fun: Fn(T1, T2, T3, T4, Ruma<Req>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Req::OutgoingResponse, Err>> + Send, Req: IncomingRequest + Debug + Send + Sync + 'static, Req::Authentication: AuthDispatch, Err: IntoResponse + Debug + Send, <Req as IncomingRequest>::OutgoingResponse: Debug + Send, T1: FromRequestParts<State> + Send + Sync + 'static, T2: FromRequestParts<State> + Send + Sync + 'static, T3: FromRequestParts<State> + Send + Sync + 'static, T4: FromRequestParts<State> + Send + Sync + 'static,