Skip to main content

count_items

Function count_items 

Source
pub fn count_items<'b, S, T, E>(
    stream: S,
    progress: &Progress,
) -> impl Stream<Item = Result<T, E>> + Send + 'b
where S: Stream<Item = Result<T, E>> + Send + 'b, T: 'b, E: 'b,
Expand description

Counts items flowing through an item stream, without touching errors or the outcome.

Used on the encode side, where items exist only upstream of the encoder. This is the one place they are still items rather than bytes.