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
Improve documentation for FromRequest::Future #2734
Conversation
The best practice for Actix Web is to use |
OK |
You can also make a new type and implement |
I tried to find resources on this information and couldn't find any. And even when I asked on the forum, a Rust (specifically async; Alice is a primary maintainer of Tokio) expert said something different than what you all are saying. So it's not true that it's a "basic language feature" (it's not a language feature at all, but that's beside the point). Anyway, I think it would be helpful. There are no examples that I could find in the docs that used it. |
Sorry, part of my previous comment was incorrect. I found one example using LocalBoxFuture in one place. 😃 |
I'm not saying the language feature have a good discovery. I'm saying said discovery does not belong to actix-web library. Making related question more easy to get answer of from other source is better than burden some library that not maintained by rust-lang domain. |
BTW |
The existence of boxed futures, no, but the Actix convention to use LocolBoxFuture yes.
If the convention changes from LocalBoxFuture to something else (maybe
Whoever created and/or will change the convention. |
PR Type
Other: Documentation
PR Checklist
Overview
Improve documentation for the
Future
associated type of theFromRequest
trait. I was confused by this and made a Rust forum post where I got some help so I thought it would make sense to add this to the documentation.No breaking changes.