pub trait AsyncVariableWritable {
    type Error;

    // Required method
    fn poll_write_single(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut Option<u8>
    ) -> Poll<Result<(), Self::Error>>;

    // Provided methods
    fn poll_write_more(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut WriteBuf<'_>
    ) -> Poll<Result<(), Self::Error>> { ... }
    fn poll_write_more_buf<'a, B: Buf>(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        bytes: &'a mut B
    ) -> Poll<Result<(), Self::Error>> { ... }
}
Available on crate feature async only.

Required Associated Types§

Required Methods§

source

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

Provided Methods§

source

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

source

fn poll_write_more_buf<'a, B: Buf>( self: Pin<&mut Self>, cx: &mut Context<'_>, bytes: &'a mut B ) -> Poll<Result<(), Self::Error>>

Available on crate feature bytes only.

Object Safety§

This trait is not object safe.

Implementors§