tuwunel_core/utils/future/
mod.rs1mod bool_ext;
2mod ext_ext;
3mod option_ext;
4mod option_stream;
5mod ready_bool_ext;
6mod ready_eq_ext;
7mod try_ext_ext;
8
9pub use self::{
10 bool_ext::{BoolExt, and, and4, and5, and6, and7, or},
11 ext_ext::ExtExt,
12 option_ext::OptionFutureExt,
13 option_stream::OptionStream,
14 ready_bool_ext::ReadyBoolExt,
15 ready_eq_ext::ReadyEqExt,
16 try_ext_ext::TryExtExt,
17};
18
19#[macro_export]
26macro_rules! ready_some {
27 ($e:expr) => {
28 match $e {
29 | std::task::Poll::Ready(Some(v)) => v,
30 | std::task::Poll::Ready(None) => return std::task::Poll::Ready(None),
31 | std::task::Poll::Pending => return std::task::Poll::Pending,
32 }
33 };
34}