Skip to content

Commit

Permalink
Updated docs regarding constraints of Handler arguments (#2451)
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrogen602 authored Dec 29, 2023
1 parent 4f010d9 commit 6c276c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion axum/src/docs/debugging_handler_type_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ For a function to be used as a handler it must implement the [`Handler`] trait.
axum provides blanket implementations for functions that:

- Are `async fn`s.
- Take no more than 16 arguments that all implement [`FromRequest`].
- Take no more than 16 arguments that all implement `Send`.
- All except the last argument implement [`FromRequestParts`].
- The last argument implements [`FromRequest`].
- Returns something that implements [`IntoResponse`].
- If a closure is used it must implement `Clone + Send` and be
`'static`.
Expand Down

0 comments on commit 6c276c3

Please sign in to comment.