Skip to main content

Module stream

Module stream 

Source

Structs§

SseToNdjsonRewriter
Incremental SSE -> NDJSON converter.

Functions§

drain_lines
Drains complete \n-terminated lines from pending into out, stripping trailing \r\n. Empty lines are skipped.
split_lines
Splits bytes into newline-delimited lines. Complete lines go through drain_lines; any trailing bytes without a terminating \n are also emitted as a final element.
split_lines_owned
Convenience wrapper that returns owned lines instead of appending to a vec.
sse_to_ndjson_stream
Converts internal standard SSE payload (data: ...\n\n) into NDJSON.