In the tokio.rs docs we see the following snippet
// split the socket stream into readable and writable parts
let (reader, writer) = socket.split();
// copy bytes from the reader into the writer
let amount = io::copy(reader, writer);
I am assuming that split
is indeed Stream::split
, but I can't figure out how this trait applies to TcpStream
given that the stream page doesn't mention TcpStream
and vice versa.