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