Type Definition iced::Subscription

source ·
pub type Subscription<T> = Subscription<Hasher, (Event, Status), T>;
Expand description

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.