diff --git a/futures-util/src/future/option.rs b/futures-util/src/future/option.rs index 0bc377758..e124b6732 100644 --- a/futures-util/src/future/option.rs +++ b/futures-util/src/future/option.rs @@ -62,3 +62,15 @@ impl From> for OptionFuture { Self { inner: option } } } + +impl OptionFuture { + /// Returns `true` if the future is present. + pub fn is_some(&self) -> bool { + self.inner.is_some() + } + + /// Returns `true` if the future is absent. + pub fn is_node(&self) -> bool { + self.inner.is_none() + } +}