Expand description
Incremental SSE and newline-delimited framing of response bytes.
SSE dispatch requires a blank line; incomplete events are not flushed at EOF.
NDJSON permits a final unterminated line through NdjsonFramer::finish.
use rig_http::http_client::framing::NdjsonFramer;
let mut framer = NdjsonFramer::new();
assert_eq!(framer.push(b"{}\n").collect::<Vec<_>>(), vec![b"{}".to_vec()]);Structs§
- Ndjson
Framer - Splits nonempty newline-delimited payloads without validating JSON.
A nonempty unterminated last line is available through
Self::finish. - SseEvent
- One dispatched
text/event-streamevent. - SseFramer
- A push parser for the WHATWG
text/event-streamgrammar.