pub fn checksum_stream<I: Stream<Item = (Arc<Path>, Checksum)> + Send + Unpin + 'static>(
    inputs: I
) -> impl Stream<Item = impl Future<Output = (Arc<Path>, Result<(), ChecksumError>)>>
Expand description

Generates a stream of futures that validate checksums.

The caller can choose to distribute these futures across a thread pool.

let mut stream = checksum_stream(checksums).map(tokio::spawn).buffered(8);
while let Some((path, result)) = stream.next().await {
    eprintln!("{:?} checksum result: {:?}", path, result);
}