From 8bc49cd88653309f5abe8a38d5a4af36fcfea933 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 5 Jul 2024 02:15:13 +0200 Subject: Hide `Subscription` internals .. and introduce `stream::channel` helper --- src/lib.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index bc3fe6ab..09d9860e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -175,6 +175,7 @@ use iced_winit::core; use iced_winit::runtime; pub use iced_futures::futures; +pub use iced_futures::stream; #[cfg(feature = "highlighter")] pub use iced_highlighter as highlighter; @@ -202,6 +203,7 @@ pub use crate::core::{ Theme, Transformation, Vector, }; pub use crate::runtime::{exit, Task}; +pub use iced_futures::Subscription; pub mod clipboard { //! Access the clipboard. @@ -255,13 +257,6 @@ pub mod mouse { }; } -pub mod subscription { - //! Listen to external events in your application. - pub use iced_futures::subscription::{ - channel, run, run_with_id, unfold, Subscription, - }; -} - #[cfg(feature = "system")] pub mod system { //! Retrieve system information. @@ -314,7 +309,6 @@ pub use executor::Executor; pub use font::Font; pub use renderer::Renderer; pub use settings::Settings; -pub use subscription::Subscription; #[doc(inline)] pub use application::application; -- cgit From c9e0ed7ca4a7fce23450b9aeba6eb79244832521 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 5 Jul 2024 02:22:56 +0200 Subject: Expose `from_recipe` and `into_recipes` in `advanced::subscription` --- src/advanced.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/advanced.rs b/src/advanced.rs index 8d06e805..b817bbf9 100644 --- a/src/advanced.rs +++ b/src/advanced.rs @@ -14,6 +14,6 @@ pub use crate::renderer::graphics; pub mod subscription { //! Write your own subscriptions. pub use crate::runtime::futures::subscription::{ - EventStream, Hasher, Recipe, + from_recipe, into_recipes, EventStream, Hasher, Recipe, }; } -- cgit