pub trait ITcpStream:
AsyncRead
+ AsyncWrite
+ Unpin
+ Send
+ Sync {
// Required methods
fn peer_addr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn local_addr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A TcpStream.
Required Methods§
fn peer_addr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn local_addr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Blanket Implementations§
Source§impl<T> IntoDyn<Box<dyn ITcpStream>> for Twhere
T: ITcpStream,
impl<T> IntoDyn<Box<dyn ITcpStream>> for Twhere
T: ITcpStream,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".