Expand description
A module for parsing Server-Sent Events (SSE) streams according to the SSE specification.
This module provides SseLineCodec<T>
, a codec for decoding SSE streams into typed messages.
It handles parsing of id
, event
, data
, and comments, and attempts to deserialize
the data
field into the specified type T
.
Structs§
- Message
- Represents a parsed SSE message.
- SseLine
Codec - A codec for decoding SSE streams into
Message<T>
instances.
Enums§
- SseCodec
Error - An error that occurs when decoding an SSE stream.
Functions§
- create_
message_ stream - Creates a stream of
Message
instances from a text stream of SSE events.