New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc documentation improvements #1647
Conversation
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
/// | ||
/// if content_type.starts_with("application/json") { | ||
/// let Json(payload) = req | ||
/// .extract::<Json<T>, _>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all these extracts[_parts]
turbofishes needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly no but I've seen users be confused about what M
is in fn extract<E, M>
not realizing they can use _
and rely on inference. So I wanted to explicitly show that.
RequestPartsExt
andRequestExt
State
is global within the routerfrom_fn_with_state
infrom_fn
docsfrom_fn
examples a bit