Skip to main content

Module sse

Module sse 

Source
Expand description

Lightweight Server-Sent Events (SSE) protocol parser.

Parses an SSE byte stream (from reqwest::Response::chunk()) into typed RawSseEvent values. Follows the SSE specification: fields are separated by \n, events are delimited by \n\n.

Structs§

RawSseEvent
A single parsed SSE event.

Enums§

SseError
Errors that can occur while parsing an SSE stream.

Functions§

parse_sse_stream
Parse a reqwest streaming response into a stream of RawSseEvents.