axum-errors-handler-trait
Axum Handler Trait Errors
Overview
Axum has no handler macro. A function becomes a handler purely by satisfying the
Handler<T, S> trait, which has a single blanket implementation guarded by a long
conjunction of bounds. When a function fails ANY one bound, the compiler reports
the WHOLE impl as unsatisfied. It cannot point at the failing conjunct, so it
emits the opaque error[E0277]: the trait bound ... Handler<_, _> is not satisfied, names the trait with inference placeholders, and lists unrelated
Handler impls as "help".
Every such error reduces to exactly one of five root causes. The diagnostic tool
is the #[debug_handler] attribute macro from axum-macros: it rewrites the
opaque error into a precise, plain-language one that points at the exact argument
or return type at fault.