File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 13
13
use io:: { self , ErrorKind } ;
14
14
15
15
pub mod args;
16
- #[ cfg( any ( not ( cargobuild ) , feature = "backtrace" ) ) ]
16
+ #[ cfg( feature = "backtrace" ) ]
17
17
pub mod backtrace;
18
18
pub mod condvar;
19
19
pub mod env;
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ impl TcpStream {
63
63
Ok ( path_to_local_addr ( path. to_str ( ) . unwrap_or ( "" ) ) )
64
64
}
65
65
66
+ pub fn peek ( & self , _buf : & mut [ u8 ] ) -> Result < usize > {
67
+ Err ( Error :: new ( ErrorKind :: Other , "TcpStream::peek not implemented" ) )
68
+ }
69
+
66
70
pub fn shutdown ( & self , _how : Shutdown ) -> Result < ( ) > {
67
71
Err ( Error :: new ( ErrorKind :: Other , "TcpStream::shutdown not implemented" ) )
68
72
}
Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ impl UdpSocket {
87
87
Ok ( path_to_local_addr ( path. to_str ( ) . unwrap_or ( "" ) ) )
88
88
}
89
89
90
+ pub fn peek ( & self , _buf : & mut [ u8 ] ) -> Result < usize > {
91
+ Err ( Error :: new ( ErrorKind :: Other , "UdpSocket::peek not implemented" ) )
92
+ }
93
+
94
+ pub fn peek_from ( & self , _buf : & mut [ u8 ] ) -> Result < ( usize , SocketAddr ) > {
95
+ Err ( Error :: new ( ErrorKind :: Other , "UdpSocket::peek_from not implemented" ) )
96
+ }
97
+
90
98
pub fn broadcast ( & self ) -> Result < bool > {
91
99
Err ( Error :: new ( ErrorKind :: Other , "UdpSocket::broadcast not implemented" ) )
92
100
}
You can’t perform that action at this time.
0 commit comments