ktls/async_read_ready.rs
1use std::{io, task};
2
3pub trait AsyncReadReady {
4 /// cf. https://docs.rs/tokio/latest/tokio/net/struct.TcpStream.html#method.poll_read_ready
5 fn poll_read_ready(&self, cx: &mut task::Context<'_>) -> task::Poll<io::Result<()>>;
6}
7
8impl AsyncReadReady for tokio::net::TcpStream {
9 fn poll_read_ready(&self, cx: &mut task::Context<'_>) -> task::Poll<io::Result<()>> {
10 tokio::net::TcpStream::poll_read_ready(self, cx)
11 }
12}