diff options
author | 2020-01-21 00:15:01 +0100 | |
---|---|---|
committer | 2020-01-21 00:15:01 +0100 | |
commit | 7016221556ea8183ebcd8ef8df00044e2eda71e7 (patch) | |
tree | bc1609b71b88437fc7497af339b6427f63121c76 /web/src | |
parent | 6ca5e6184f9f1c12b427bdafcce0b4e9fbc5bb14 (diff) | |
parent | 91d9d65a03ce9b211e4043726e7424949d314325 (diff) | |
download | iced-7016221556ea8183ebcd8ef8df00044e2eda71e7.tar.gz iced-7016221556ea8183ebcd8ef8df00044e2eda71e7.tar.bz2 iced-7016221556ea8183ebcd8ef8df00044e2eda71e7.zip |
Merge pull request #164 from hecrj/feature/custom-runtime
Custom futures executor with `iced_futures`
Diffstat (limited to 'web/src')
-rw-r--r-- | web/src/lib.rs | 11 | ||||
-rw-r--r-- | web/src/subscription.rs | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/web/src/lib.rs b/web/src/lib.rs index 7ea22e85..b1bb80e3 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -72,13 +72,19 @@ pub use dodrio; pub use element::Element; pub use hasher::Hasher; pub use iced_core::{ - Align, Background, Color, Command, Font, HorizontalAlignment, Length, + Align, Background, Color, Font, HorizontalAlignment, Length, Vector, VerticalAlignment, }; +pub use iced_futures::{executor, futures, Command}; pub use style::Style; pub use subscription::Subscription; + +#[doc(no_inline)] pub use widget::*; +#[doc(no_inline)] +pub use executor::Executor; + /// An interactive web application. /// /// This trait is the main entrypoint of Iced. Once implemented, you can run @@ -148,7 +154,6 @@ pub trait Application { } } - struct Instance<Message> { title: String, ui: Rc<RefCell<Box<dyn Application<Message = Message>>>>, @@ -167,7 +172,7 @@ impl<Message> Clone for Instance<Message> { impl<Message> Instance<Message> where - Message: 'static + Message: 'static, { fn new(ui: impl Application<Message = Message> + 'static) -> Self { Self { diff --git a/web/src/subscription.rs b/web/src/subscription.rs index 4638c8ab..6b8415c0 100644 --- a/web/src/subscription.rs +++ b/web/src/subscription.rs @@ -14,6 +14,6 @@ use crate::Hasher; /// /// [`Command`]: ../struct.Command.html /// [`Subscription`]: struct.Subscription.html -pub type Subscription<T> = iced_core::Subscription<Hasher, (), T>; +pub type Subscription<T> = iced_futures::Subscription<Hasher, (), T>; -pub use iced_core::subscription::Recipe; +pub use iced_futures::subscription::Recipe; |