summaryrefslogtreecommitdiffstats
path: root/native/src/runtime.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-19 10:17:08 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-19 10:17:44 +0100
commitb5b17ed4d800c03beb3ad535d1069a7784e8dc1d (patch)
treeb9e6477bd11bd6784f8ee61e818b5f5ff1a44318 /native/src/runtime.rs
parentd50ff9b5d97d9c3d6c6c70a9b4efe764b6126c86 (diff)
downloadiced-b5b17ed4d800c03beb3ad535d1069a7784e8dc1d.tar.gz
iced-b5b17ed4d800c03beb3ad535d1069a7784e8dc1d.tar.bz2
iced-b5b17ed4d800c03beb3ad535d1069a7784e8dc1d.zip
Create `iced_futures` and wire everything up
Diffstat (limited to 'native/src/runtime.rs')
-rw-r--r--native/src/runtime.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/native/src/runtime.rs b/native/src/runtime.rs
new file mode 100644
index 00000000..2b3abbf1
--- /dev/null
+++ b/native/src/runtime.rs
@@ -0,0 +1,14 @@
+//! Run commands and subscriptions.
+use crate::{Event, Hasher};
+
+/// A native runtime with a generic executor and receiver of results.
+///
+/// It can be used by shells to easily spawn a [`Command`] or track a
+/// [`Subscription`].
+///
+/// [`Command`]: ../struct.Command.html
+/// [`Subscription`]: ../struct.Subscription.html
+pub type Runtime<Executor, Receiver, Message> =
+ iced_futures::Runtime<Hasher, Event, Executor, Receiver, Message>;
+
+pub use iced_futures::runtime::Executor;