summaryrefslogtreecommitdiffstats
path: root/tokio-util/src/lib.rs
diff options
context:
space:
mode:
authorEliza Weisman <eliza@buoyant.io>2020-01-29 11:14:24 -0800
committerGitHub <noreply@github.com>2020-01-29 11:14:24 -0800
commitbe832f20cb30bc014cd2518617d9a7ce72f6480c (patch)
treebe9bf28d603dbe433976c8bdf4b4b05b0b1af0f1 /tokio-util/src/lib.rs
parent326f724978c9a4f540465901702989ce72a0d434 (diff)
util: add futures-io/tokio::io compatibility layer (#2117)
* util: add futures-io/tokio::io compatibility layer This PR adds a compatibility layer with conversions between the `tokio::io` and `futures-io` versions of the `AsyncRead` and `AsyncWrite` traits. I initially opened this PR against `tokio-compat`, but we decided that a compatibility layer for current versions of the `tokio` and `futures-io` crates (rather than for compatibility with legacy code) ought to go in `tokio-util` instead. See: https://github.com/tokio-rs/tokio-compat/pull/2#issuecomment-551310953 This is based on code originally written by @Nemo157 as part of the `futures-tokio-compat` crate, and is contributed on behalf of the original author: https://github.com/Nemo157/futures-tokio-compat/issues/2#issuecomment-544118866 Closes tokio-rs/tokio-compat#2 Co-authored-by: Wim Looman <wim@nemo157.com> Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Diffstat (limited to 'tokio-util/src/lib.rs')
-rw-r--r--tokio-util/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tokio-util/src/lib.rs b/tokio-util/src/lib.rs
index 48c0fd16..4554516e 100644
--- a/tokio-util/src/lib.rs
+++ b/tokio-util/src/lib.rs
@@ -25,3 +25,7 @@ cfg_codec! {
cfg_udp! {
pub mod udp;
}
+
+cfg_compat! {
+ pub mod compat;
+}