Expand description
Server-Sent Events (SSE) implementation module.
This module provides functionality for handling Server-Sent Events, a web standard that allows a server to push data to a web page in real-time. SSE is useful for applications that need to stream live data to clients, such as chat applications, live feeds, or real-time notifications.
The module includes utilities for formatting SSE messages, managing event streams, and handling the SSE protocol according to the W3C specification.
§Examples
// Basic SSE event creation and formatting
use http_kit::sse::Event;
let event = Event::from_data("Hello, World!").with_id("my-id");Structs§
- Event
- Represents a Server-Sent Event that can be sent to clients.
- SseStream
- A stream wrapper for Server-Sent Events over an HTTP body.
Enums§
- Parse
Error - Errors that can occur while parsing Server-Sent Events.