ssevents/stream
Lightweight iterator utilities for chunk-based encode/decode flows.
The current gleam_stdlib version used by this repository does
not ship a general-purpose iterator module, so ssevents provides
a tiny local one for its own stream adapters.
Types
Values
pub fn decode_stream(
chunks: Iterator(BitArray),
) -> Iterator(Result(event.Item, error.SseError))
pub fn decode_stream_with_limits(
chunks: Iterator(BitArray),
limits limits: limit.Limits,
) -> Iterator(Result(event.Item, error.SseError))
pub fn encode_stream(
items: Iterator(event.Item),
) -> Iterator(BitArray)