Skip to main content

futures_x_io/
lib.rs

1#[cfg(feature = "futures_io")]
2pub mod futures_io {
3    pub use ::futures_io::{AsyncBufRead, AsyncRead, AsyncSeek, AsyncWrite};
4}
5
6#[cfg(feature = "tokio02_io")]
7pub mod tokio02_io {
8    pub use ::tokio02::io::{AsyncBufRead, AsyncRead, AsyncSeek, AsyncWrite};
9}
10
11#[cfg(feature = "tokio_io")]
12pub mod tokio_io {
13    pub use tokio::io::{AsyncBufRead, AsyncRead, AsyncSeek, AsyncWrite};
14
15    pub mod ext {
16        pub use tokio::io::ReadBuf;
17    }
18}
19
20#[cfg(all(
21    feature = "futures_io",
22    not(feature = "tokio02_io"),
23    not(feature = "tokio_io")
24))]
25pub use self::futures_io::*;
26
27#[cfg(all(
28    not(feature = "futures_io"),
29    feature = "tokio02_io",
30    not(feature = "tokio_io")
31))]
32pub use self::tokio02_io::*;
33
34#[cfg(all(
35    not(feature = "futures_io"),
36    not(feature = "tokio02_io"),
37    feature = "tokio_io"
38))]
39pub use self::tokio_io::*;
40
41//
42//
43//
44#[cfg(feature = "futures_util_io")]
45pub mod futures_util_io {
46    pub use futures_util::io::Cursor;
47    pub use futures_util::io::{
48        AsyncBufReadExt, AsyncReadExt, AsyncSeekExt, AsyncWriteExt, BufReader,
49    };
50}
51
52#[cfg(feature = "futures_lite_io")]
53pub mod futures_lite_io {
54    pub use futures_lite::io::Cursor;
55    pub use futures_lite::io::{
56        AsyncBufReadExt, AsyncReadExt, AsyncSeekExt, AsyncWriteExt, BufReader,
57    };
58}
59
60#[cfg(feature = "tokio02_io_util")]
61pub mod tokio02_io_util {
62    pub use std::io::Cursor;
63    pub use tokio02::io::{AsyncBufReadExt, AsyncReadExt, AsyncSeekExt, AsyncWriteExt, BufReader};
64}
65
66#[cfg(feature = "tokio_io_util")]
67pub mod tokio_io_util {
68    pub use std::io::Cursor;
69    pub use tokio::io::{AsyncBufReadExt, AsyncReadExt, AsyncSeekExt, AsyncWriteExt, BufReader};
70}
71
72#[cfg(all(
73    feature = "futures_util_io",
74    not(feature = "futures_lite_io"),
75    not(feature = "tokio02_io_util"),
76    not(feature = "tokio_io_util"),
77    feature = "futures_io",
78    not(feature = "tokio02_io"),
79    not(feature = "tokio_io")
80))]
81pub use self::futures_util_io::*;
82
83#[cfg(all(
84    not(feature = "futures_util_io"),
85    feature = "futures_lite_io",
86    not(feature = "tokio02_io_util"),
87    not(feature = "tokio_io_util"),
88    feature = "futures_io",
89    not(feature = "tokio02_io"),
90    not(feature = "tokio_io")
91))]
92pub use self::futures_lite_io::*;
93
94#[cfg(all(
95    not(feature = "futures_util_io"),
96    not(feature = "futures_lite_io"),
97    feature = "tokio02_io_util",
98    not(feature = "tokio_io_util"),
99    not(feature = "futures_io"),
100    feature = "tokio02_io",
101    not(feature = "tokio_io")
102))]
103pub use self::tokio02_io_util::*;
104
105#[cfg(all(
106    not(feature = "futures_util_io"),
107    not(feature = "futures_lite_io"),
108    not(feature = "tokio02_io_util"),
109    feature = "tokio_io_util",
110    not(feature = "futures_io"),
111    not(feature = "tokio02_io"),
112    feature = "tokio_io"
113))]
114pub use self::tokio_io_util::*;