/rust/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-util-0.7.18/src/util/mod.rs
Line | Count | Source |
1 | | mod maybe_dangling; |
2 | | #[cfg(any(feature = "io", feature = "codec"))] |
3 | | mod poll_buf; |
4 | | |
5 | | pub(crate) use maybe_dangling::MaybeDangling; |
6 | | #[cfg(any(feature = "io", feature = "codec"))] |
7 | | #[cfg_attr(not(feature = "io"), allow(unreachable_pub))] |
8 | | pub use poll_buf::{poll_read_buf, poll_write_buf}; |
9 | | |
10 | | cfg_rt! { |
11 | | #[cfg_attr(not(feature = "io"), allow(unused))] |
12 | | pub(crate) use tokio::task::coop::poll_proceed; |
13 | | } |
14 | | |
15 | | cfg_not_rt! { |
16 | | #[cfg_attr(not(feature = "io"), allow(unused))] |
17 | | use std::task::{Context, Poll}; |
18 | | |
19 | | #[cfg_attr(not(feature = "io"), allow(unused))] |
20 | | pub(crate) struct RestoreOnPending; |
21 | | |
22 | | #[cfg_attr(not(feature = "io"), allow(unused))] |
23 | | impl RestoreOnPending { |
24 | 0 | pub(crate) fn made_progress(&self) {} |
25 | | } |
26 | | |
27 | | #[cfg_attr(not(feature = "io"), allow(unused))] |
28 | 0 | pub(crate) fn poll_proceed(_cx: &mut Context<'_>) -> Poll<RestoreOnPending> { |
29 | 0 | Poll::Ready(RestoreOnPending) |
30 | 0 | } |
31 | | } |