Expand description
Streaming response bodies
Response::stream hands out a
BodySender; whatever is sent through it goes to the client right away.
For Server-Sent Events see sse.
Structsยง
- Body
Sender - Sends body chunks of a streaming response; clone it to feed one stream from several tasks. The body ends when all clones are dropped.
- Disconnected
- The client closed the connection (or the response was dropped)