Trait async_hal::io::AsyncWrite

source ·
pub trait AsyncWrite {
    type Error;

    // Required methods
    fn poll_write(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &[u8]
    ) -> Poll<Result<usize, Self::Error>>;
    fn poll_flush(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>
    ) -> Poll<Result<(), Self::Error>>;
}

Required Associated Types§

Required Methods§

source

fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8] ) -> Poll<Result<usize, Self::Error>>

source

fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>

Implementors§

source§

impl<T> AsyncWrite for Writer<T>where T: Sink<u8> + Unpin,

§

type Error = <T as Sink<u8>>::Error