Implement subscription::Tracker in iced_core
This commit is contained in:
parent
6ca5e6184f
commit
32f7ca261f
7 changed files with 131 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue