diff options
author | 2020-01-19 08:36:44 +0100 | |
---|---|---|
committer | 2020-01-19 08:36:44 +0100 | |
commit | 32f7ca261f0655938ae7c8919599b020ddea8ff8 (patch) | |
tree | 65e0e9b440c70225b42a8125f94bc17ca1e77201 /native | |
parent | 6ca5e6184f9f1c12b427bdafcce0b4e9fbc5bb14 (diff) | |
download | iced-32f7ca261f0655938ae7c8919599b020ddea8ff8.tar.gz iced-32f7ca261f0655938ae7c8919599b020ddea8ff8.tar.bz2 iced-32f7ca261f0655938ae7c8919599b020ddea8ff8.zip |
Implement `subscription::Tracker` in `iced_core`
Diffstat (limited to 'native')
-rw-r--r-- | native/src/subscription.rs | 7 | ||||
-rw-r--r-- | native/src/subscription/events.rs | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/native/src/subscription.rs b/native/src/subscription.rs index db88867a..cd0822c1 100644 --- a/native/src/subscription.rs +++ b/native/src/subscription.rs @@ -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_core::Subscription<Hasher, Event, T>; /// A stream of runtime events. /// @@ -24,6 +24,11 @@ pub type Subscription<T> = iced_core::Subscription<Hasher, EventStream, T>; /// [`Subscription`]: type.Subscription.html pub type EventStream = BoxStream<'static, Event>; +/// A native [`Subscription`] tracker. +/// +/// [`Subscription`]: type.Subscription.html +pub type Tracker = iced_core::subscription::Tracker<Hasher, Event>; + pub use iced_core::subscription::Recipe; mod events; diff --git a/native/src/subscription/events.rs b/native/src/subscription/events.rs index b7301828..6ff2c0fb 100644 --- a/native/src/subscription/events.rs +++ b/native/src/subscription/events.rs @@ -5,7 +5,7 @@ use crate::{ pub struct Events; -impl Recipe<Hasher, EventStream> for Events { +impl Recipe<Hasher, Event> for Events { type Output = Event; fn hash(&self, state: &mut Hasher) { |