Skip to main content

instrument

Function instrument 

Source
pub fn instrument<'b, S>(
    stream: S,
    progress: Progress,
    counting: Counting,
) -> impl Stream<Item = S::Item> + Send + 'b
where S: Stream + Unpin + Send + 'b, S::Item: ProgressItem,
Expand description

Reports errors, owns the outcome state machine, and optionally counts items.

Wrap the outermost stream with this: every error passes through there, and its Drop is the only way to notice an end that stopped early.