From 32f7ca261f0655938ae7c8919599b020ddea8ff8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 19 Jan 2020 08:36:44 +0100 Subject: Implement `subscription::Tracker` in `iced_core` --- core/src/subscription.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'core/src/subscription.rs') diff --git a/core/src/subscription.rs b/core/src/subscription.rs index d9e7e388..87e51e48 100644 --- a/core/src/subscription.rs +++ b/core/src/subscription.rs @@ -1,4 +1,9 @@ //! Listen to external events in your application. +mod tracker; + +pub use tracker::Tracker; + +use futures::stream::BoxStream; /// A request to listen to external events. /// @@ -134,8 +139,8 @@ pub trait Recipe { /// [`Recipe`]: trait.Recipe.html fn stream( self: Box, - input: Input, - ) -> futures::stream::BoxStream<'static, Self::Output>; + input: BoxStream<'static, Input>, + ) -> BoxStream<'static, Self::Output>; } struct Map { @@ -169,7 +174,7 @@ where fn stream( self: Box, - input: I, + input: BoxStream<'static, I>, ) -> futures::stream::BoxStream<'static, Self::Output> { use futures::StreamExt; -- cgit