What problem does it solve?
Axum often rejects a handler with an opaque compile-time error like the Handler trait bound not being satisfied, even when the function looks close to correct; this Skill helps you identify and fix the exact mismatch in the handler signature.
Core Features & Use Cases
- Diagnose handler eligibility: Ensures the handler is an async function (or async closure) whose arguments are valid extractors and whose body extractor is positioned last.
- Validate return types: Enforces that the return value implements IntoResponse, including Result-style handlers for typed failures.
- Prevent Send-related rejection: Avoids !Send futures caused by holding non-Send values (e.g., std::sync::MutexGuard, Rc, RefCell borrows) across await points.
- Control extractor arity: Prevents the “more than 16 arguments” failure by guiding extractor bundling into a custom struct implementing FromRequestParts.
- Fallback for debugging: Directs you to apply #[debug_handler] first to get precise diagnostics for the failing argument or return type.
Quick Start
Ask the AI to rewrite your handler function so it compiles on Axum 0.8 by using only extractor arguments (with a single body extractor last), an IntoResponse-compatible return type, and #[debug_handler] when needed.