pub trait AsyncVariableReadable {
    type Error;

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

    // Provided methods
    fn poll_read_more(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut ReadBuf<'_>
    ) -> Poll<Result<(), Self::Error>> { ... }
    fn poll_read_more_buf<'a, B: BufMut>(
        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_read_single( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut Option<u8> ) -> Poll<Result<u8, Self::Error>>

Provided Methods§

source

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

source

fn poll_read_more_buf<'a, B: BufMut>( 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§