Skip to main content

RouterExt

Trait RouterExt 

Source
pub trait RouterExt {
    // Required method
    fn ruma_route<H: RumaHandler<T>, T>(self, handler: &'static H) -> Self;
}
Expand description

Extends routers with Matrix endpoint registration.

Each handler registers the paths declared by its request type.

Required Methods§

Source

fn ruma_route<H: RumaHandler<T>, T>(self, handler: &'static H) -> Self

Registers a Matrix endpoint handler with this router.

The handler supplies the paths declared by its request type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RouterExt for Router<State>

Source§

fn ruma_route<H: RumaHandler<T>, T>(self, handler: &'static H) -> Self

Implementors§