Trait RawTcpStream
pub trait RawTcpStream:
Sealed
+ AsyncRead
+ AsyncWrite
+ Socket
+ Unpin
+ Send
+ 'static { }Available on crate features
std and tcp only.Expand description
A raw TCP stream that PostedRecv can take over reading from.
Sealed, and only implemented for TcpStream and TokioTcpStream:
the posted receives read the socket directly, so wrapping a stream that
transforms its bytes (TLS, a peek buffer, …) would bypass it. Their
sockets suit overlapped receives. Code that uses the raw socket of a
wrapped stream must not issue overlapped I/O on it, which would complete
to the wrapper’s port and never be reported to its issuer, nor set
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS on it, before or after wrapping.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".