Skip to main content

wrap_result_progress_stream

Function wrap_result_progress_stream 

Source
pub fn wrap_result_progress_stream<T, P, E>(
    stream: impl Stream<Item = Result<Progress<T, P>, E>> + Send + 'static,
    content_type: &'static str,
    provenance: Vec<String>,
) -> PlexusStream
where T: Serialize + Send + 'static, P: Serialize + Send + 'static, E: Serialize + Send + 'static,
Expand description

-> impl Stream<Item = Result<Progress<T, P>, E>>: Ok(Update(p)) → a progress frame; Ok(Item(t)) → a data frame {"ok": t}; Err(e) → a data frame {"err": e}. Then done.