1mod maybe_dangling;
2#[cfg(any(feature = "io", feature = "codec"))]
3mod poll_buf;
4
5pub(crate) use maybe_dangling::MaybeDangling;
6#[cfg(any(feature = "io", feature = "codec"))]
7#[cfg_attr(not(feature = "io"), allow(unreachable_pub))]
8pub use poll_buf::{poll_read_buf, poll_write_buf};
9
10cfg_rt! {
11 #[cfg_attr(not(feature = "io"), allow(unused))]
12 pub(crate) use tokio::task::coop::poll_proceed;
13}
14
15cfg_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 pub(crate) fn made_progress(&self) {}
25 }
26
27 #[cfg_attr(not(feature = "io"), allow(unused))]
28 pub(crate) fn poll_proceed(_cx: &mut Context<'_>) -> Poll<RestoreOnPending> {
29 Poll::Ready(RestoreOnPending)
30 }
31}