Expand description
Server-Sent Events (SSE) response builder.
Builds a hyper::Response with Content-Type: text/event-stream and
streams events from an InMemoryQueueReader as SSE frames.
Structs§
- SseBody
Writer - Wraps an
mpsc::Senderfor writing SSE frames to a response body.
Functions§
- build_
sse_ response - Builds an SSE streaming response from an event queue reader.
- write_
event - Formats a single SSE frame with the given event type and data.
- write_
keep_ alive - Formats a keep-alive SSE comment.