Function notification_sse_stream

Source
pub fn notification_sse_stream<Request, Response>(
    original_request: Request,
    http_response: Response<Body>,
) -> Pin<Box<dyn Stream<Item = Result<Response, ProtocolError>> + Send>>
where Request: Clone + Send + Sync + 'static, Response: ResponseHttpConvert<Request, Response> + Send + Sync + 'static,
Expand description

Converts an HttpResponse<Body> to a NotificationStream<Response> so server-side events can be consumed by the HTTP client. Can be useful for implementing ResponseHttpConvert::from_http_response.