pub trait AsyncReadAndWrite:
AsyncRead
+ AsyncWrite
+ Debug
+ Unpin
+ Send
+ Sync {
// Provided method
fn try_into_tcp_stream(self) -> Result<TcpStream, Self>
where Self: Sized { ... }
}Provided Methods§
Sourcefn try_into_tcp_stream(self) -> Result<TcpStream, Self>where
Self: Sized,
fn try_into_tcp_stream(self) -> Result<TcpStream, Self>where
Self: Sized,
Returns Ok() if the type can be converted without loss to a TcpStream, or Err(self) otherwise. This is used by the proxy server to decide whether we can use splice(2).