We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d43f417 commit 8735d40Copy full SHA for 8735d40
futures-io/src/lib.rs
@@ -270,6 +270,24 @@ mod if_std {
270
deref_async_read!();
271
}
272
273
+ impl<'a, T: ?Sized + AsyncRead> AsyncRead for Pin<&'a mut T> {
274
+ unsafe fn initializer(&self) -> Initializer {
275
+ (**self).initializer()
276
+ }
277
+
278
+ fn poll_read(mut self: Pin<&mut Self>, waker: &Waker, buf: &mut [u8])
279
+ -> Poll<Result<usize>>
280
+ {
281
+ T::poll_read((*self).as_mut(), waker, buf)
282
283
284
+ fn poll_vectored_read(mut self: Pin<&mut Self>, waker: &Waker, vec: &mut [&mut IoVec])
285
286
287
+ T::poll_vectored_read((*self).as_mut(), waker, vec)
288
289
290
291
/// `unsafe` because the `StdIo::Read` type must not access the buffer
292
/// before reading data into it.
293
macro_rules! unsafe_delegate_async_read_to_stdio {
0 commit comments