summaryrefslogtreecommitdiffstats
path: root/futures
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 17:19:28 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 17:19:28 +0200
commit27fdc707562d4e229f07ed9496ed5d64f4e108bc (patch)
tree8a87286f0ccd125df1c2b5c597c2d2805ceb27c5 /futures
parenta97c520c814a6d3cc538537791be39e0c3182d6d (diff)
parent02914e5e68d1fbaad53483cd32c74d9ac448d1eb (diff)
downloadiced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.tar.gz
iced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.tar.bz2
iced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.zip
Merge branch 'master' into dev/system-information
Diffstat (limited to 'futures')
-rw-r--r--futures/Cargo.toml2
-rw-r--r--futures/src/command.rs2
-rw-r--r--futures/src/runtime.rs6
-rw-r--r--futures/src/subscription.rs6
4 files changed, 10 insertions, 6 deletions
diff --git a/futures/Cargo.toml b/futures/Cargo.toml
index 78e673e0..ed99d79a 100644
--- a/futures/Cargo.toml
+++ b/futures/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "iced_futures"
-version = "0.3.0"
+version = "0.4.0"
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
edition = "2021"
description = "Commands, subscriptions, and runtimes for Iced"
diff --git a/futures/src/command.rs b/futures/src/command.rs
index d8adfe49..05c3a1d0 100644
--- a/futures/src/command.rs
+++ b/futures/src/command.rs
@@ -17,7 +17,7 @@ impl<T> Command<T> {
Self(Internal::None)
}
- /// Creates a [`Command`] that performs a single [`Action`].
+ /// Creates a [`Command`] that performs a single action.
pub const fn single(action: T) -> Self {
Self(Internal::Single(action))
}
diff --git a/futures/src/runtime.rs b/futures/src/runtime.rs
index 2034ed6c..34f6b6dd 100644
--- a/futures/src/runtime.rs
+++ b/futures/src/runtime.rs
@@ -9,6 +9,8 @@ use std::marker::PhantomData;
///
/// If you have an [`Executor`], a [`Runtime`] can be leveraged to run any
/// [`Command`] or [`Subscription`] and get notified of the results!
+///
+/// [`Command`]: crate::Command
#[derive(Debug)]
pub struct Runtime<Hasher, Event, Executor, Sender, Message> {
executor: Executor,
@@ -51,10 +53,12 @@ where
self.executor.enter(f)
}
- /// Spawns a [`Command`] in the [`Runtime`].
+ /// Spawns a [`Future`] in the [`Runtime`].
///
/// The resulting `Message` will be forwarded to the `Sender` of the
/// [`Runtime`].
+ ///
+ /// [`Future`]: BoxFuture
pub fn spawn(&mut self, future: BoxFuture<Message>) {
use futures::{FutureExt, SinkExt};
diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs
index 6f261827..0085886d 100644
--- a/futures/src/subscription.rs
+++ b/futures/src/subscription.rs
@@ -125,9 +125,9 @@ impl<I, O, H> std::fmt::Debug for Subscription<I, O, H> {
/// - [`stopwatch`], a watch with start/stop and reset buttons showcasing how
/// to listen to time.
///
-/// [examples]: https://github.com/iced-rs/iced/tree/0.3/examples
-/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.3/examples/download_progress
-/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.3/examples/stopwatch
+/// [examples]: https://github.com/iced-rs/iced/tree/0.4/examples
+/// [`download_progress`]: https://github.com/iced-rs/iced/tree/0.4/examples/download_progress
+/// [`stopwatch`]: https://github.com/iced-rs/iced/tree/0.4/examples/stopwatch
pub trait Recipe<Hasher: std::hash::Hasher, Event> {
/// The events that will be produced by a [`Subscription`] with this
/// [`Recipe`].