[−][src]Trait romio::raw::AsyncReadReady
Determine if the underlying API can be read from.
Associated Types
type Ok
The type of successful values yielded by this trait.
type Err: Error + Send + Sync
The type of failures yielded by this trait.
Required methods
fn poll_read_ready(
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
Check if the underlying API can be read from.
Provided methods
fn poll_read_ready_unpin(
&mut self,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>> where
Self: Unpin,
&mut self,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>> where
Self: Unpin,
A convenience for calling AsyncReadReady::poll_read_ready
on Unpin
types.
Implementors
impl AsyncReadReady for TcpStream
[src]
type Ok = Ready
type Err = Error
fn poll_read_ready(
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
[src]
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
Poll the TCP stream's readiness for reading.
If the stream is not ready for a read then the method will return Poll::Pending
and schedule the current task for wakeup upon read-readiness.
Once the stream is ready for reading, it will remain so until all available
bytes have been extracted (via futures::io::AsyncRead
and related traits).
impl AsyncReadReady for UdpSocket where
Self: Unpin,
[src]
Self: Unpin,
type Ok = Ready
type Err = Error
fn poll_read_ready(
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
[src]
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
Check the UDP socket's read readiness state.
If the socket is not ready for receiving then Poll::Pending
is
returned and the current task is notified once a new event is received.
The socket will remain in a read-ready state until calls to poll_recv
return Pending
.
impl AsyncReadReady for UnixDatagram
[src]
type Ok = Ready
type Err = Error
fn poll_read_ready(
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
[src]
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
Test whether this socket is ready to be read or not.