Fix missing Subscription type in iced_web

This commit is contained in:
Héctor Ramón Jiménez 2019-12-18 23:57:02 +01:00
parent 0f2e20f5e5
commit 9ca65c9f18
5 changed files with 47 additions and 3 deletions

19
web/src/subscription.rs Normal file
View file

@ -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<T> = iced_core::Subscription<Hasher, (), T>;
pub use iced_core::subscription::Recipe;