1 | macro_rules! ready { |
2 | ($e:expr) => { |
3 | match $e { |
4 | std::task::Poll::Ready(v) => v, |
5 | std::task::Poll::Pending => return std::task::Poll::Pending, |
6 | } |
7 | }; |
8 | } |
9 | |
10 | pub(crate) mod buf; |
11 | #[cfg (all(feature = "server" , any(feature = "http1" , feature = "http2" )))] |
12 | pub(crate) mod date; |
13 | #[cfg (all(feature = "server" , any(feature = "http1" , feature = "http2" )))] |
14 | pub(crate) mod drain; |
15 | #[cfg (any(feature = "http1" , feature = "http2" , feature = "server" ))] |
16 | pub(crate) mod exec; |
17 | pub(crate) mod io; |
18 | #[cfg (all(feature = "client" , any(feature = "http1" , feature = "http2" )))] |
19 | mod lazy; |
20 | mod never; |
21 | #[cfg (any( |
22 | feature = "stream" , |
23 | all(feature = "client" , any(feature = "http1" , feature = "http2" )) |
24 | ))] |
25 | pub(crate) mod sync_wrapper; |
26 | pub(crate) mod task; |
27 | pub(crate) mod watch; |
28 | |
29 | #[cfg (all(feature = "client" , any(feature = "http1" , feature = "http2" )))] |
30 | pub(crate) use self::lazy::{lazy, Started as Lazy}; |
31 | #[cfg (any(feature = "http1" , feature = "http2" , feature = "runtime" ))] |
32 | pub(crate) use self::never::Never; |
33 | pub(crate) use self::task::Poll; |
34 | |
35 | // group up types normally needed for `Future` |
36 | cfg_proto! { |
37 | pub(crate) use std::marker::Unpin; |
38 | } |
39 | pub(crate) use std::{future::Future, pin::Pin}; |
40 | |