From 9ca65c9f18454ba2bb3ff5667d9618a1491771db Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 18 Dec 2019 23:57:02 +0100 Subject: Fix missing `Subscription` type in `iced_web` --- web/src/subscription.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 web/src/subscription.rs (limited to 'web/src/subscription.rs') diff --git a/web/src/subscription.rs b/web/src/subscription.rs new file mode 100644 index 00000000..4638c8ab --- /dev/null +++ b/web/src/subscription.rs @@ -0,0 +1,19 @@ +//! 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`]: ../struct.Command.html +/// [`Subscription`]: struct.Subscription.html +pub type Subscription = iced_core::Subscription; + +pub use iced_core::subscription::Recipe; -- cgit