pub enum Action { Future(iced_futures::BoxFuture), } impl Action { /// Applies a transformation to the result of a [`Command`]. #[cfg(target_arch = "wasm32")] pub fn map(self, f: impl Fn(T) -> A + 'static) -> Action where T: 'static, { use iced_futures::futures::FutureExt; match self { Self::Future(future) => Action::Future(Box::pin(future.map(f))), } } }