summaryrefslogtreecommitdiffstats
path: root/core/src/subscription.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-19 08:36:44 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-19 08:36:44 +0100
commit32f7ca261f0655938ae7c8919599b020ddea8ff8 (patch)
tree65e0e9b440c70225b42a8125f94bc17ca1e77201 /core/src/subscription.rs
parent6ca5e6184f9f1c12b427bdafcce0b4e9fbc5bb14 (diff)
downloadiced-32f7ca261f0655938ae7c8919599b020ddea8ff8.tar.gz
iced-32f7ca261f0655938ae7c8919599b020ddea8ff8.tar.bz2
iced-32f7ca261f0655938ae7c8919599b020ddea8ff8.zip
Implement `subscription::Tracker` in `iced_core`
Diffstat (limited to 'core/src/subscription.rs')
-rw-r--r--core/src/subscription.rs11
1 files changed, 8 insertions, 3 deletions
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<Hasher: std::hash::Hasher, Input> {
/// [`Recipe`]: trait.Recipe.html
fn stream(
self: Box<Self>,
- input: Input,
- ) -> futures::stream::BoxStream<'static, Self::Output>;
+ input: BoxStream<'static, Input>,
+ ) -> BoxStream<'static, Self::Output>;
}
struct Map<Hasher, Input, A, B> {
@@ -169,7 +174,7 @@ where
fn stream(
self: Box<Self>,
- input: I,
+ input: BoxStream<'static, I>,
) -> futures::stream::BoxStream<'static, Self::Output> {
use futures::StreamExt;