iced_futures/backend/null.rs
1//! A backend that does nothing!
2use crate::MaybeSend;
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 fn spawn(&self, _future: impl Future<Output = ()> + MaybeSend + 'static) {}
14
15 #[cfg(not(target_arch = "wasm32"))]
16 fn block_on<T>(&self, _future: impl Future<Output = T>) -> T {
17 unimplemented!()
18 }
19}
20
21pub mod time {
22 //! Listen and react to time.
23}