(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
)
| 96 | |
| 97 | impl<D: Digest, W: AsyncWrite> AsyncWrite for HashWriter<D, W> { |
| 98 | fn poll_write( |
| 99 | self: Pin<&mut Self>, |
| 100 | cx: &mut Context<'_>, |
| 101 | buf: &[u8], |
| 102 | ) -> Poll<io::Result<usize>> { |
| 103 | let this = self.project(); |
| 104 | let result = this.writer.poll_write(cx, buf); |
| 105 | if let Poll::Ready(Ok(n)) = result { |
| 106 | if n > 0 { |
| 107 | this.hasher.update(&buf[..n]); |
| 108 | } |
| 109 | } |
| 110 | result |
| 111 | } |
| 112 | |
| 113 | fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> { |
| 114 | self.project().writer.poll_flush(cx) |
nothing calls this directly
no outgoing calls
no test coverage detected