diff options
author | 2020-01-21 00:15:01 +0100 | |
---|---|---|
committer | 2020-01-21 00:15:01 +0100 | |
commit | 7016221556ea8183ebcd8ef8df00044e2eda71e7 (patch) | |
tree | bc1609b71b88437fc7497af339b6427f63121c76 /native/src/subscription.rs | |
parent | 6ca5e6184f9f1c12b427bdafcce0b4e9fbc5bb14 (diff) | |
parent | 91d9d65a03ce9b211e4043726e7424949d314325 (diff) | |
download | iced-7016221556ea8183ebcd8ef8df00044e2eda71e7.tar.gz iced-7016221556ea8183ebcd8ef8df00044e2eda71e7.tar.bz2 iced-7016221556ea8183ebcd8ef8df00044e2eda71e7.zip |
Merge pull request #164 from hecrj/feature/custom-runtime
Custom futures executor with `iced_futures`
Diffstat (limited to 'native/src/subscription.rs')
-rw-r--r-- | native/src/subscription.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/native/src/subscription.rs b/native/src/subscription.rs index db88867a..0d002c6c 100644 --- a/native/src/subscription.rs +++ b/native/src/subscription.rs @@ -1,6 +1,6 @@ //! Listen to external events in your application. use crate::{Event, Hasher}; -use futures::stream::BoxStream; +use iced_futures::futures::stream::BoxStream; /// A request to listen to external events. /// @@ -15,7 +15,7 @@ use futures::stream::BoxStream; /// /// [`Command`]: ../struct.Command.html /// [`Subscription`]: struct.Subscription.html -pub type Subscription<T> = iced_core::Subscription<Hasher, EventStream, T>; +pub type Subscription<T> = iced_futures::Subscription<Hasher, Event, T>; /// A stream of runtime events. /// @@ -24,7 +24,12 @@ pub type Subscription<T> = iced_core::Subscription<Hasher, EventStream, T>; /// [`Subscription`]: type.Subscription.html pub type EventStream = BoxStream<'static, Event>; -pub use iced_core::subscription::Recipe; +/// A native [`Subscription`] tracker. +/// +/// [`Subscription`]: type.Subscription.html +pub type Tracker = iced_futures::subscription::Tracker<Hasher, Event>; + +pub use iced_futures::subscription::Recipe; mod events; |