@@ -12,6 +12,11 @@ impl<T: ?Sized + Read> Read for Box<T> {
1212 fn read ( & mut self , buf : & mut [ u8 ] ) -> Result < usize , Self :: Error > {
1313 T :: read ( self , buf)
1414 }
15+
16+ #[ inline]
17+ fn read_exact ( & mut self , buf : & mut [ u8 ] ) -> Result < ( ) , crate :: ReadExactError < Self :: Error > > {
18+ T :: read_exact ( self , buf)
19+ }
1520}
1621
1722#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
@@ -20,6 +25,7 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
2025 T :: fill_buf ( self )
2126 }
2227
28+ #[ inline]
2329 fn consume ( & mut self , amt : usize ) {
2430 T :: consume ( self , amt) ;
2531 }
@@ -32,6 +38,19 @@ impl<T: ?Sized + Write> Write for Box<T> {
3238 T :: write ( self , buf)
3339 }
3440
41+ #[ inline]
42+ fn write_all ( & mut self , buf : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
43+ T :: write_all ( self , buf)
44+ }
45+
46+ #[ inline]
47+ fn write_fmt (
48+ & mut self ,
49+ fmt : core:: fmt:: Arguments < ' _ > ,
50+ ) -> Result < ( ) , crate :: WriteFmtError < Self :: Error > > {
51+ T :: write_fmt ( self , fmt)
52+ }
53+
3554 #[ inline]
3655 fn flush ( & mut self ) -> Result < ( ) , Self :: Error > {
3756 T :: flush ( self )
@@ -44,6 +63,21 @@ impl<T: ?Sized + Seek> Seek for Box<T> {
4463 fn seek ( & mut self , pos : crate :: SeekFrom ) -> Result < u64 , Self :: Error > {
4564 T :: seek ( self , pos)
4665 }
66+
67+ #[ inline]
68+ fn rewind ( & mut self ) -> Result < ( ) , Self :: Error > {
69+ T :: rewind ( self )
70+ }
71+
72+ #[ inline]
73+ fn stream_position ( & mut self ) -> Result < u64 , Self :: Error > {
74+ T :: stream_position ( self )
75+ }
76+
77+ #[ inline]
78+ fn seek_relative ( & mut self , offset : i64 ) -> Result < ( ) , Self :: Error > {
79+ T :: seek_relative ( self , offset)
80+ }
4781}
4882
4983#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
0 commit comments