What problem does it solve?
This Skill helps you diagnose and fix Axum’s opaque Handler trait compile failures (typically Rust E0277) when a function does not satisfy Handler<_, _>, so your route won’t register and your handler arguments or return type break compilation.
Core Features & Use Cases
- Root-cause decision tree: maps the
#[debug_handler] diagnostics to one of five primary causes (non-extractor arguments, body extractor ordering, return type not implementing IntoResponse, non-async handler, and !Send futures).
- Deterministic diagnostic workflow: instructs you to add
#[debug_handler], recompile, read the precise error span, and apply the matching fix.
- Axum 0.7/0.8 compatibility guidance: confirms the diagnostic and fixes work across both versions, including the state type override via
#[debug_handler(state = ...)].
- Common pitfalls and guardrails: covers macro feature requirements (
axum macros feature), the impl-block-without-self limitation, and avoiding guesswork from the raw opaque compiler output.
Quick Start
Add the #[debug_handler] attribute (with the axum crate macros feature enabled) to your rejected Axum handler, recompile, then fix the specific highlighted argument or return type using the five-cause decision tree.