This exposes `decoder::aio::TokioReader<T>` in a similar manner to
`decoder::sync::StandardReader<T>`, which is necessary if one wants
to remain generic over `T: tokio::io::AsyncRead`, e.g.:
> struct FooDecoder<T: tokio::io::AsyncRead> {
> decoder: aio::Decoder<aio::TokioReader<T>>,
> }
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
}
impl<T: tokio::io::AsyncRead> TokioReader<T> {
+ /// Create a new [TokioReader] from a type that implements [AsyncRead](tokio::io::AsyncRead).
pub fn new(inner: T) -> Self {
Self { inner }
}
}
#[cfg(feature = "tokio-io")]
-use tok::TokioReader;
+pub use tok::TokioReader;