Skip to main content

PollRead

Trait PollRead 

Source
pub trait PollRead {
    // Required method
    fn poll_read(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut [u8],
    ) -> Poll<Result<usize>>;
}
Expand description

Minimal poll-based read trait used by Foctet runtime adapters.

Required Methods§

Source

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

Attempts to read bytes into buf.

Implementors§

Source§

impl<T> PollRead for FuturesIo<T>
where T: AsyncRead + Unpin,

Available on crate feature runtime-futures only.
Source§

impl<T> PollRead for TokioIo<T>
where T: AsyncRead + Unpin,

Available on crate feature runtime-tokio only.