pub fn sse_event(evt: &NormalizedEvent) -> StringExpand description
Convert a NormalizedEvent to an SSE-formatted string.
The output follows the Server-Sent Events specification with both
an event: line (for EventSource listeners) and a data: line
containing the JSON payload.
ยงExample
use universal_agent_runtime::normalized::{NormalizedEvent, sse_event};
let event = NormalizedEvent::Done;
let sse = sse_event(&event);
assert!(sse.contains("event: done"));