Function stream

Source
pub async fn stream<O: DeserializeOwned + Send + 'static>(
    event_source: EventSource,
    stream_done_message: &'static str,
) -> Result<Pin<Box<dyn Stream<Item = Result<O, Error>> + Send>>, Error>