Trait AsyncVariableReadable

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§