1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
cfg_if::cfg_if! {
    if #[cfg(all(feature = "syncable_with_context", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod syncable_with_context;
        pub use syncable_with_context::SyncableWithContextAsyncStream;
    } else if #[cfg(all(feature = "syncable_with_context", not(feature = "futures_io"), feature = "tokio_io"))] {
        pub mod syncable_with_context;
        pub use syncable_with_context::SyncableWithContextAsyncStream;
    }
}

cfg_if::cfg_if! {
    if #[cfg(all(feature = "syncable_with_waker", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod syncable_with_waker;
        pub use syncable_with_waker::SyncableWithWakerAsyncStream;
    } else if #[cfg(all(feature = "syncable_with_waker", not(feature = "futures_io"), feature = "tokio_io"))] {
        // Not support
    }
}

cfg_if::cfg_if! {
    if #[cfg(all(feature = "unionable", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod unionable;
        pub use unionable::UnionableAsyncStream;
    } else if #[cfg(all(feature = "unionable", not(feature = "futures_io"), feature = "tokio_io"))] {
        pub mod unionable;
        pub use unionable::UnionableAsyncStream;
    }
}

cfg_if::cfg_if! {
    if #[cfg(all(feature = "upgradable", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod upgradable;
        pub use upgradable::{UpgradableAsyncStream, Upgrader};

        pub mod upgradable_ext;
        pub use upgradable_ext::{UpgraderExtIntoStream, UpgraderExtRefer};

        pub mod gradable;
        pub use gradable::{Downgrader, GradableAsyncStream};
    } else if #[cfg(all(feature = "upgradable", not(feature = "futures_io"), feature = "tokio_io"))] {
        pub mod upgradable;
        pub use upgradable::{UpgradableAsyncStream, Upgrader};

        pub mod upgradable_ext;
        pub use upgradable_ext::{UpgraderExtIntoStream, UpgraderExtRefer};

        pub mod gradable;
        pub use gradable::{Downgrader, GradableAsyncStream};
    }
}

cfg_if::cfg_if! {
    if #[cfg(all(feature = "timeoutable", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod timeoutable;
        pub use timeoutable::{AsyncReadWithTimeoutExt, AsyncWriteWithTimeoutExt};
    } else if #[cfg(all(feature = "timeoutable", not(feature = "futures_io"), feature = "tokio_io"))] {
        pub mod timeoutable;
        pub use timeoutable::{AsyncReadWithTimeoutExt, AsyncWriteWithTimeoutExt};
    }
}

//
//
//
cfg_if::cfg_if! {
    if #[cfg(all(feature = "tls", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod tls;
        pub use tls::{TlsClientUpgrader, TlsServerUpgrader};
    } else if #[cfg(all(feature = "tls", not(feature = "futures_io"), feature = "tokio_io"))] {
        pub mod tls;
        pub use tls::{TlsClientUpgrader, TlsServerUpgrader};
    }
}

cfg_if::cfg_if! {
    if #[cfg(all(feature = "http", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod http;
        pub use http::{HttpClientInnerStream, HttpClientProxy, HttpTunnelClientGrader};
    } else if #[cfg(all(feature = "http", not(feature = "futures_io"), feature = "tokio_io"))] {
        pub mod http;
        pub use http::{HttpClientInnerStream, HttpClientProxy, HttpTunnelClientGrader};
    }
}

cfg_if::cfg_if! {
    if #[cfg(all(feature = "mail", feature = "futures_io", not(feature = "tokio_io")))] {
        pub mod mail;
        pub use mail::{ImapClientInnerStream, SmtpClientInnerStream};
    } else if #[cfg(all(feature = "mail", not(feature = "futures_io"), feature = "tokio_io"))] {
        pub mod mail;
        pub use mail::{ImapClientInnerStream, SmtpClientInnerStream};
    }
}