async fn hash<D: Digest + Write>( r: impl AsyncRead + Unpin, w: impl AsyncWrite + Unpin, ) -> Result<(Output<D>, u64)>
Copies all data from the passed reader to the passed writer. Afterwards, it also returns the resulting Digest, as well as the number of bytes copied. The exact hash function used is left generic over all Digest.