pub trait HtmxRouter: Sized {
type State: Send + Sync + Clone + 'static;
// Required method
fn htmx_route(self, handler: impl HtmxHandler<Self::State>) -> Self;
}Expand description
A trait that allows typed routes, created with the hx_ macros to
be added to an axum router.
Required Associated Types§
Required Methods§
Sourcefn htmx_route(self, handler: impl HtmxHandler<Self::State>) -> Self
fn htmx_route(self, handler: impl HtmxHandler<Self::State>) -> Self
Add an HTMX route to the router.
Typed handlers are functions that return HtmxHandler.
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.