Trait AsyncWriteReady

Source
pub trait AsyncWriteReady {
    type Ok;
    type Err: Error + Send + Sync;

    // Required method
    fn poll_write_ready(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
    ) -> Poll<Result<Self::Ok, Self::Err>>;

    // Provided method
    fn poll_write_ready_unpin(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<Self::Ok, Self::Err>>
       where Self: Unpin + Sized { ... }
}
Expand description

Determine if the underlying API can be written to.

Required Associated Types§

Source

type Ok

The type of successful values yielded by this trait.

Source

type Err: Error + Send + Sync

The type of failures yielded by this trait.

Required Methods§

Source

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.

Provided Methods§

Source

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

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

Implementors§