Implement subscription::Tracker in iced_core

This commit is contained in:
Héctor Ramón Jiménez 2020-01-19 08:36:44 +01:00
parent 6ca5e6184f
commit 32f7ca261f
7 changed files with 131 additions and 8 deletions

View file

@ -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;

View file

@ -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) {