pub fn create_sse_stream<T>(
events: Vec<T>,
formatter: impl Fn(&T) -> String + Send + 'static,
) -> impl Stream<Item = Result<Bytes>> + Send + 'staticwhere
T: Send + 'static,Expand description
Create a stream of SSE events from a vector of data
Utility function for testing and simple use cases where you have a known set of events to stream.