pub trait OptionFutureExt<T> {
// Required methods
fn is_none_or(
self,
f: impl FnOnce(&T) -> bool + Send,
) -> impl Future<Output = bool> + Send;
fn is_some_and(
self,
f: impl FnOnce(&T) -> bool + Send,
) -> impl Future<Output = bool> + Send;
fn unwrap_or(self, t: T) -> impl Future<Output = T> + Send;
fn unwrap_or_default(self) -> impl Future<Output = T> + Send
where T: Default;
fn unwrap_or_else(
self,
f: impl FnOnce() -> T + Send,
) -> impl Future<Output = T> + Send;
fn unwrap_or_else_async<F: Future<Output = T> + Send>(
self,
f: impl FnOnce() -> F + Send,
) -> impl Future<Output = Option<T>> + Send;
}Required Methods§
fn is_none_or( self, f: impl FnOnce(&T) -> bool + Send, ) -> impl Future<Output = bool> + Send
fn is_some_and( self, f: impl FnOnce(&T) -> bool + Send, ) -> impl Future<Output = bool> + Send
fn unwrap_or(self, t: T) -> impl Future<Output = T> + Send
fn unwrap_or_default(self) -> impl Future<Output = T> + Sendwhere
T: Default,
fn unwrap_or_else( self, f: impl FnOnce() -> T + Send, ) -> impl Future<Output = T> + Send
fn unwrap_or_else_async<F: Future<Output = T> + Send>( self, f: impl FnOnce() -> F + Send, ) -> impl Future<Output = Option<T>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.