Skip to main content

AsyncVariableWritable

Trait AsyncVariableWritable 

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<W: AsyncWrite + Unpin> AsyncVariableWritable for W

Available on crate feature tokio-comp only.