Trait ITcpStream

Source
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§

Source

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,

Source

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,

Implementors§