Where does tokio_tungstenite::WebSocketStream
implement the split()
function as used in one of their examples?
The following is a snippet of the example:
let (ws_stream, _) = connect_async(url).await.expect("Failed to connect");
let (write, read) = ws_stream.split();
Someone else had a similar problem finding split()
in tokio::net::TcpStream
and the answer was that TcpStream
implements AsyncRead
. In the case of WebSocketStream
I cannot see any impl AsyncRead for WebSocketStream
code.
My broader question is what knowledge am I missing that stops me from finding methods such as split()
and their implementations of a struct such as WebSocketStream
in docs.rs or in the source code?