1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//! Listen to external events in your application. use crate::Hasher; /// A request to listen to external events. /// /// Besides performing async actions on demand with [`Command`], most /// applications also need to listen to external events passively. /// /// A [`Subscription`] is normally provided to some runtime, like a [`Command`], /// and it will generate events as long as the user keeps requesting it. /// /// For instance, you can use a [`Subscription`] to listen to a WebSocket /// connection, keyboard presses, mouse events, time ticks, etc. /// /// [`Command`]: crate::Command pub type Subscription<T> = iced_futures::Subscription<Hasher, (), T>; pub use iced_futures::subscription::Recipe;