iced_futures/backend/
null.rs

1//! A backend that does nothing!
2use futures::Future;
3
4/// An executor that drops all the futures, instead of spawning them.
5#[derive(Debug)]
6pub struct Executor;
7
8impl crate::Executor for Executor {
9    fn new() -> Result<Self, futures::io::Error> {
10        Ok(Self)
11    }
12
13    #[cfg(not(target_arch = "wasm32"))]
14    fn spawn(&self, _future: impl Future<Output = ()> + Send + 'static) {}
15
16    #[cfg(target_arch = "wasm32")]
17    fn spawn(&self, _future: impl Future<Output = ()> + 'static) {}
18}
19
20pub mod time {
21    //! Listen and react to time.
22}