usestd::net::SocketAddr;usetokio::net::TcpStream;/// Trait that connected IO resources implement.
////// The goal for this trait is to allow users to implement
/// custom IO types that can still provide the same connection
/// metadata.
pubtraitConnected{/// Return the remote address this IO resource is connected too.
fnremote_addr(&self)->Option<SocketAddr>{None}}implConnected forTcpStream{fnremote_addr(&self)->Option<SocketAddr>{self.peer_addr().ok()}}