axum-core-router
Installation
SKILL.md
axum-core-router
Router<S> is the central routing type in Axum. It maps request paths to
handlers through method-routers, composes sub-routers, and is itself a
tower::Service. The generic S is the state type the router still requires;
a serveable router is Router<()>.
When To Use This Skill
- Defining routes with
.route()and method-routers - Mounting sub-routers with
.nest()or flattening them with.merge() - Wiring middleware with
.layer()or.route_layer() - The server panics at startup with a routing or path message
- A request returns
404where405is expected, or the reverse - Middleware runs on some routes but not others