Skip to main content

count_bytes

Function count_bytes 

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

Counts the bytes flowing through a byte stream.

Applied to the byte stream rather than the item stream so that bytes is what actually crossed the wire, independently of how many objects that turned into.