Rocket/site/guide
Sergio Benitez 4c6562cd29 Drop 'Data' after sending a response, not before.
This allows responses to be sent to the client even when data is only
partially read, significantly improving the experience for the client
from one with a "connection closed" error to one with a proper response.
The consequence is a lifetime in 'Data'.

Though other non-lifetime-introducing solutions exist, the introduction
of a lifetime to 'Data' is a longstanding desire as it prevents
smuggling 'Data' into a longer-lived context. Use of 'Data' in that
context was unspecified with various runtime consequences. The addition
of a lifetime bound by the request prevents this error statically.

In summary, the changes are:
  * Clients receive responses even when data isn't fully read.
  * 'Data' becomes 'Data<'r>'. 'FromData' changes accordingly.
  * Route 'Outcome's are strictly tied to the request lifetime.

Tangentially, the invalid length form field validation error message has
improved to format length in byte units if it exceeds 1024.
2021-06-08 13:26:16 -07:00
..
0-introduction.md Update various dead hyperlinks; change some links from http to https. 2021-02-20 12:01:44 -08:00
1-quickstart.md Fix references to removed 'hello_world' example. 2021-05-22 16:43:21 -07:00
2-getting-started.md Update examples on site index and overview. 2021-04-14 22:17:15 -07:00
3-overview.md Prefer using 'io::Result' responder in docs. 2021-05-22 22:12:46 -07:00
4-requests.md Drop 'Data' after sending a response, not before. 2021-06-08 13:26:16 -07:00
5-responses.md Add more examples to wrapping responders guide. 2021-06-02 18:04:15 -07:00
6-state.md Split 'rocket_contrib' into distinct crates. 2021-05-24 22:57:51 -07:00
7-fairings.md Drop 'Data' after sending a response, not before. 2021-06-08 13:26:16 -07:00
8-testing.md Fix references to removed 'hello_world' example. 2021-05-22 16:43:21 -07:00
9-configuration.md Split 'rocket_contrib' into distinct crates. 2021-05-24 22:57:51 -07:00
10-pastebin.md Drop 'Data' after sending a response, not before. 2021-06-08 13:26:16 -07:00
11-conclusion.md Fix several typos in the guide. 2021-02-20 12:01:44 -08:00
index.md Fix several typos in the guide. 2021-02-20 12:01:44 -08:00