Responder does not use Future, contrary to the documentation
Description
In core/lib/src/response/responder.rs, line 109, it is written that
/// A `Responder` returns a `Future` whose output type is a `Result<Response,
/// Status>`.
which would be a very useful feature.
However, the code of the Responder trait is not async nor uses a Future, contrary to what the documentation says:
fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>;
It would be great to have this feature available.
From my understanding, the doc comment is wrong, responders aren't meant to be async. It's the Handler's job to do any async calculation prior to returning the Responder. In can't think of a situation where respond_to being sync would make anything harder. However, you could still respond with (async) streams depending on what you're trying to do exactly. This can be seen as an "async response" in a way...
@edgarogh's response is exactly right. This is a doc bug. The string should be updated to reflect what @edgarogh has commented.