pub trait RumaHandler<T> {
// Required methods
fn add_routes(&'static self, router: Router<State>) -> Router<State>;
fn add_route(
&'static self,
router: Router<State>,
path: &str,
) -> Router<State>;
fn call_route(
handler: &'static (dyn Any + Send + Sync),
state: State,
request: Request<Body>,
) -> impl Future<Output = Response> + Send + 'static;
}Expand description
Registers Matrix request handlers with a router.
Implementations convert incoming requests and dispatch them to endpoint handlers.
Required Methods§
Sourcefn add_routes(&'static self, router: Router<State>) -> Router<State>
fn add_routes(&'static self, router: Router<State>) -> Router<State>
Registers every path declared by the request type.
Each path dispatches requests to this handler.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".