Skip to main content

RawTcpStream

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; no other overlapped I/O may be issued on a wrapped socket.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl RawTcpStream for rama::tcp::TokioTcpStream

§

impl RawTcpStream for rama::tcp::TcpStream