pub fn notification_sse_response<Request, Response>(
notification_stream: Pin<Box<dyn Stream<Item = Result<Response, ProtocolError>> + Send>>,
) -> Response<Body>where
Request: Clone,
Response: ResponseHttpConvert<Request, Response> + 'static,
Expand description
Converts a NotificationStream<Response>
to an HttpResponse<Body>
so
server-side events can be produced by the HTTP server. Can be useful for implementing
ResponseHttpConvert::to_http_response
.