pub trait ReadWrite:
AsyncRead
+ AsyncWrite
+ Unpin
+ Send
+ Sync
+ Debug { }Expand description
A marker trait for types that can act as the underlying transport.
Any type that implements tokio::io::AsyncRead + tokio::io::AsyncWrite
Unpin+Send+Sync+std::fmt::Debugautomatically satisfies this bound via the blanket impl below. Tokio’sTcpStream,UnixStream, and the TUN-device wrappers used in tests all qualify.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".