[][src]Trait romio::raw::AsyncReadReady

pub trait AsyncReadReady {
    type Ok;
    type Err: Error + Send + Sync;
    fn poll_read_ready(
        self: Pin<&mut Self>,
        cx: &mut Context
    ) -> Poll<Result<Self::Ok, Self::Err>>; fn poll_read_ready_unpin(
        &mut self,
        cx: &mut Context
    ) -> Poll<Result<Self::Ok, Self::Err>>
    where
        Self: Unpin
, { ... } }

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.

Loading content...

Required methods

fn poll_read_ready(
    self: Pin<&mut Self>,
    cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>

Check if the underlying API can be read from.

Loading content...

Provided methods

fn poll_read_ready_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.

Loading content...

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]

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]

type Ok = Ready

type Err = Error

fn poll_read_ready(
    self: Pin<&mut Self>,
    cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>
[src]

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]

Test whether this socket is ready to be read or not.

impl AsyncReadReady for UnixStream[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]

Test whether this socket is ready to be read or not.

Loading content...