@@ -45,6 +45,7 @@ impl<R: Read + ?Sized> Read for &mut R {
45
45
fn read_exact ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < ( ) > {
46
46
( * * self ) . read_exact ( buf)
47
47
}
48
+
48
49
#[ inline]
49
50
fn read_buf_exact ( & mut self , cursor : BorrowedCursor < ' _ > ) -> io:: Result < ( ) > {
50
51
( * * self ) . read_buf_exact ( cursor)
@@ -77,6 +78,11 @@ impl<W: Write + ?Sized> Write for &mut W {
77
78
( * * self ) . write_all ( buf)
78
79
}
79
80
81
+ #[ inline]
82
+ fn write_all_vectored ( & mut self , bufs : & mut [ IoSlice < ' _ > ] ) -> io:: Result < ( ) > {
83
+ ( * * self ) . write_all_vectored ( bufs)
84
+ }
85
+
80
86
#[ inline]
81
87
fn write_fmt ( & mut self , fmt : fmt:: Arguments < ' _ > ) -> io:: Result < ( ) > {
82
88
( * * self ) . write_fmt ( fmt)
@@ -89,10 +95,25 @@ impl<S: Seek + ?Sized> Seek for &mut S {
89
95
( * * self ) . seek ( pos)
90
96
}
91
97
98
+ #[ inline]
99
+ fn rewind ( & mut self ) -> io:: Result < ( ) > {
100
+ ( * * self ) . rewind ( )
101
+ }
102
+
103
+ #[ inline]
104
+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
105
+ ( * * self ) . stream_len ( )
106
+ }
107
+
92
108
#[ inline]
93
109
fn stream_position ( & mut self ) -> io:: Result < u64 > {
94
110
( * * self ) . stream_position ( )
95
111
}
112
+
113
+ #[ inline]
114
+ fn seek_relative ( & mut self , offset : i64 ) -> io:: Result < ( ) > {
115
+ ( * * self ) . seek_relative ( offset)
116
+ }
96
117
}
97
118
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
98
119
impl < B : BufRead + ?Sized > BufRead for & mut B {
@@ -106,11 +127,21 @@ impl<B: BufRead + ?Sized> BufRead for &mut B {
106
127
( * * self ) . consume ( amt)
107
128
}
108
129
130
+ #[ inline]
131
+ fn has_data_left ( & mut self ) -> io:: Result < bool > {
132
+ ( * * self ) . has_data_left ( )
133
+ }
134
+
109
135
#[ inline]
110
136
fn read_until ( & mut self , byte : u8 , buf : & mut Vec < u8 > ) -> io:: Result < usize > {
111
137
( * * self ) . read_until ( byte, buf)
112
138
}
113
139
140
+ #[ inline]
141
+ fn skip_until ( & mut self , byte : u8 ) -> io:: Result < usize > {
142
+ ( * * self ) . skip_until ( byte)
143
+ }
144
+
114
145
#[ inline]
115
146
fn read_line ( & mut self , buf : & mut String ) -> io:: Result < usize > {
116
147
( * * self ) . read_line ( buf)
@@ -153,6 +184,7 @@ impl<R: Read + ?Sized> Read for Box<R> {
153
184
fn read_exact ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < ( ) > {
154
185
( * * self ) . read_exact ( buf)
155
186
}
187
+
156
188
#[ inline]
157
189
fn read_buf_exact ( & mut self , cursor : BorrowedCursor < ' _ > ) -> io:: Result < ( ) > {
158
190
( * * self ) . read_buf_exact ( cursor)
@@ -185,6 +217,11 @@ impl<W: Write + ?Sized> Write for Box<W> {
185
217
( * * self ) . write_all ( buf)
186
218
}
187
219
220
+ #[ inline]
221
+ fn write_all_vectored ( & mut self , bufs : & mut [ IoSlice < ' _ > ] ) -> io:: Result < ( ) > {
222
+ ( * * self ) . write_all_vectored ( bufs)
223
+ }
224
+
188
225
#[ inline]
189
226
fn write_fmt ( & mut self , fmt : fmt:: Arguments < ' _ > ) -> io:: Result < ( ) > {
190
227
( * * self ) . write_fmt ( fmt)
@@ -197,10 +234,25 @@ impl<S: Seek + ?Sized> Seek for Box<S> {
197
234
( * * self ) . seek ( pos)
198
235
}
199
236
237
+ #[ inline]
238
+ fn rewind ( & mut self ) -> io:: Result < ( ) > {
239
+ ( * * self ) . rewind ( )
240
+ }
241
+
242
+ #[ inline]
243
+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
244
+ ( * * self ) . stream_len ( )
245
+ }
246
+
200
247
#[ inline]
201
248
fn stream_position ( & mut self ) -> io:: Result < u64 > {
202
249
( * * self ) . stream_position ( )
203
250
}
251
+
252
+ #[ inline]
253
+ fn seek_relative ( & mut self , offset : i64 ) -> io:: Result < ( ) > {
254
+ ( * * self ) . seek_relative ( offset)
255
+ }
204
256
}
205
257
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
206
258
impl < B : BufRead + ?Sized > BufRead for Box < B > {
@@ -214,11 +266,21 @@ impl<B: BufRead + ?Sized> BufRead for Box<B> {
214
266
( * * self ) . consume ( amt)
215
267
}
216
268
269
+ #[ inline]
270
+ fn has_data_left ( & mut self ) -> io:: Result < bool > {
271
+ ( * * self ) . has_data_left ( )
272
+ }
273
+
217
274
#[ inline]
218
275
fn read_until ( & mut self , byte : u8 , buf : & mut Vec < u8 > ) -> io:: Result < usize > {
219
276
( * * self ) . read_until ( byte, buf)
220
277
}
221
278
279
+ #[ inline]
280
+ fn skip_until ( & mut self , byte : u8 ) -> io:: Result < usize > {
281
+ ( * * self ) . skip_until ( byte)
282
+ }
283
+
222
284
#[ inline]
223
285
fn read_line ( & mut self , buf : & mut String ) -> io:: Result < usize > {
224
286
( * * self ) . read_line ( buf)
0 commit comments