tokio_util::compat

Trait TokioAsyncReadCompatExt

Source
pub trait TokioAsyncReadCompatExt: AsyncRead {
    // Provided method
    fn compat(self) -> Compat<Self>
       where Self: Sized { ... }
}
Available on crate feature compat only.
Expand description

Extension trait that allows converting a type implementing tokio::io::AsyncRead to implement futures_io::AsyncRead.

Provided Methods§

Source

fn compat(self) -> Compat<Self>
where Self: Sized,

Wraps self with a compatibility layer that implements futures_io::AsyncRead.

Implementors§