[][src]Trait romio::raw::AsyncWriteReady

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

Determine if the underlying API can be written to.

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_write_ready(
    self: Pin<&mut Self>,
    cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>>

Check if the underlying API can be written to.

Loading content...

Provided methods

fn poll_write_ready_unpin(
    &mut self,
    cx: &mut Context
) -> Poll<Result<Self::Ok, Self::Err>> where
    Self: Unpin

A convenience for calling AsyncWriteReady::poll_write_ready on Unpin types.

Loading content...

Implementors

impl AsyncWriteReady for TcpStream[src]

type Ok = Ready

type Err = Error

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

Check the TCP stream's write readiness state.

This always checks for writable readiness and also checks for HUP readiness on platforms that support it.

If the resource is not ready for a write then Poll::Pending is returned and the current task is notified once a new event is received.

The I/O resource will remain in a write-ready state until calls to poll_write return NotReady.

Panics

This function panics if called from outside of a task context.

impl AsyncWriteReady for UdpSocket[src]

type Ok = Ready

type Err = Error

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

Check the UDP socket's write readiness state.

If the socket is not ready for sending then Poll::Pending is returned and the current task is notified once a new event is received.

The I/O resource will remain in a write-ready state until calls to poll_send return Pending.

Loading content...