pub async fn receive_data<S: AsyncReadExt + Unpin, D: Data>(
    stream: S
) -> Result<(S, D), ReceiveError>
Expand description

Attempts to receive some data using the stream.