[−][src]Type Definition iced_native::subscription::Subscription
type Subscription<T> = Subscription<Hasher, Event, T>;
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.