merge_sse_streams

Function merge_sse_streams 

Source
pub fn merge_sse_streams<S1, S2>(
    stream1: S1,
    stream2: S2,
) -> impl Stream<Item = Result<Bytes>> + Send + 'static
where S1: Stream<Item = Result<Bytes>> + Send + 'static, S2: Stream<Item = Result<Bytes>> + Send + 'static,
Expand description

Merge multiple SSE streams into a single stream

This is useful when you want to combine different types of events (like notifications and heartbeats) into a single SSE stream.