Method
poll_read
(
self: Pin<&mut Self>,
_cx: &mut Context<'_>,
buf: &mut io::ReadBuf<'_>,
)
Source from the content-addressed store, hash-verified
| 139 | |
| 140 | impl AsyncRead for InputFile { |
| 141 | fn poll_read( |
| 142 | self: Pin<&mut Self>, |
| 143 | _cx: &mut Context<'_>, |
| 144 | buf: &mut io::ReadBuf<'_>, |
| 145 | ) -> Poll<io::Result<()>> { |
| 146 | match (&*self.file).read(buf.initialize_unfilled()) { |
| 147 | Ok(n) => { |
| 148 | buf.advance(n); |
| 149 | Poll::Ready(Ok(())) |
| 150 | } |
| 151 | Err(e) => Poll::Ready(Err(e)), |
| 152 | } |
| 153 | } |
| 154 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected