File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1313use io:: { self , ErrorKind } ;
1414
1515pub mod args;
16- #[ cfg( any ( not ( cargobuild ) , feature = "backtrace" ) ) ]
16+ #[ cfg( feature = "backtrace" ) ]
1717pub mod backtrace;
1818pub mod condvar;
1919pub mod env;
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ impl TcpStream {
6363 Ok ( path_to_local_addr ( path. to_str ( ) . unwrap_or ( "" ) ) )
6464 }
6565
66+ pub fn peek ( & self , _buf : & mut [ u8 ] ) -> Result < usize > {
67+ Err ( Error :: new ( ErrorKind :: Other , "TcpStream::peek not implemented" ) )
68+ }
69+
6670 pub fn shutdown ( & self , _how : Shutdown ) -> Result < ( ) > {
6771 Err ( Error :: new ( ErrorKind :: Other , "TcpStream::shutdown not implemented" ) )
6872 }
Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ impl UdpSocket {
8787 Ok ( path_to_local_addr ( path. to_str ( ) . unwrap_or ( "" ) ) )
8888 }
8989
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+
9098 pub fn broadcast ( & self ) -> Result < bool > {
9199 Err ( Error :: new ( ErrorKind :: Other , "UdpSocket::broadcast not implemented" ) )
92100 }
You can’t perform that action at this time.
0 commit comments