11use std:: { io, mem:: ManuallyDrop } ;
22
3- use compio_buf:: { BufResult , IoBuf , IoBufMut } ;
3+ use compio_buf:: { BufResult , IoBuf , IoBufMut , IoVectoredBuf , IoVectoredBufMut } ;
44use compio_driver:: { FromRawFd , RawFd } ;
55use compio_io:: { AsyncRead , AsyncWrite } ;
66use compio_runtime:: TryAsRawFd ;
@@ -25,6 +25,10 @@ impl AsyncRead for Stdin {
2525 async fn read < B : IoBufMut > ( & mut self , buf : B ) -> BufResult < usize , B > {
2626 self . 0 . read ( buf) . await
2727 }
28+
29+ async fn read_vectored < V : IoVectoredBufMut > ( & mut self , buf : V ) -> BufResult < usize , V > {
30+ self . 0 . read_vectored ( buf) . await
31+ }
2832}
2933
3034impl TryAsRawFd for Stdin {
@@ -56,6 +60,10 @@ impl AsyncWrite for Stdout {
5660 self . 0 . write ( buf) . await
5761 }
5862
63+ async fn write_vectored < T : IoVectoredBuf > ( & mut self , buf : T ) -> BufResult < usize , T > {
64+ self . 0 . write_vectored ( buf) . await
65+ }
66+
5967 async fn flush ( & mut self ) -> io:: Result < ( ) > {
6068 self . 0 . flush ( ) . await
6169 }
@@ -94,6 +102,10 @@ impl AsyncWrite for Stderr {
94102 self . 0 . write ( buf) . await
95103 }
96104
105+ async fn write_vectored < T : IoVectoredBuf > ( & mut self , buf : T ) -> BufResult < usize , T > {
106+ self . 0 . write_vectored ( buf) . await
107+ }
108+
97109 async fn flush ( & mut self ) -> io:: Result < ( ) > {
98110 self . 0 . flush ( ) . await
99111 }
0 commit comments