@@ -12,6 +12,11 @@ impl<T: ?Sized + Read> Read for Box<T> {
12
12
fn read ( & mut self , buf : & mut [ u8 ] ) -> Result < usize , Self :: Error > {
13
13
T :: read ( self , buf)
14
14
}
15
+
16
+ #[ inline]
17
+ fn read_exact ( & mut self , buf : & mut [ u8 ] ) -> Result < ( ) , crate :: ReadExactError < Self :: Error > > {
18
+ T :: read_exact ( self , buf)
19
+ }
15
20
}
16
21
17
22
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
@@ -20,6 +25,7 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
20
25
T :: fill_buf ( self )
21
26
}
22
27
28
+ #[ inline]
23
29
fn consume ( & mut self , amt : usize ) {
24
30
T :: consume ( self , amt) ;
25
31
}
@@ -32,6 +38,19 @@ impl<T: ?Sized + Write> Write for Box<T> {
32
38
T :: write ( self , buf)
33
39
}
34
40
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
+
35
54
#[ inline]
36
55
fn flush ( & mut self ) -> Result < ( ) , Self :: Error > {
37
56
T :: flush ( self )
@@ -44,6 +63,21 @@ impl<T: ?Sized + Seek> Seek for Box<T> {
44
63
fn seek ( & mut self , pos : crate :: SeekFrom ) -> Result < u64 , Self :: Error > {
45
64
T :: seek ( self , pos)
46
65
}
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
+ }
47
81
}
48
82
49
83
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
0 commit comments