axum-syntax-handlers
axum-syntax-handlers
Overview
A handler is an async fn (or async closure) that accepts zero or more
extractors as arguments and returns a value that can be converted into a
response. Handlers are where request data becomes application logic.
Axum has no routing macros. A function is NOT marked as a handler with an
attribute. Eligibility is enforced entirely by the Handler<T, S> trait and
its blanket implementation. A function that meets every criterion IS a
handler; a function that fails any criterion is rejected with one opaque
error: the trait bound ... Handler<_, _> is not satisfied.
The handler model is identical across Axum 0.7 and 0.8. This skill is
version-stable; the only version-divergent handler-adjacent detail is route
path syntax, which belongs to axum-core-router.