summaryrefslogtreecommitdiffstats
path: root/futures
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--futures/src/command.rs1
-rw-r--r--futures/src/executor.rs2
-rw-r--r--futures/src/subscription.rs12
-rw-r--r--futures/src/subscription/tracker.rs2
4 files changed, 17 insertions, 0 deletions
diff --git a/futures/src/command.rs b/futures/src/command.rs
index 535ae4f7..d4f99b82 100644
--- a/futures/src/command.rs
+++ b/futures/src/command.rs
@@ -7,6 +7,7 @@ use futures::future::{Future, FutureExt};
/// using the `From` trait or [`Command::perform`].
///
/// [`Command`]: struct.Command.html
+/// [`Command::perform`]: #method.perform
pub struct Command<T> {
futures: Vec<BoxFuture<T>>,
}
diff --git a/futures/src/executor.rs b/futures/src/executor.rs
index 5378c0b3..cbd34ee8 100644
--- a/futures/src/executor.rs
+++ b/futures/src/executor.rs
@@ -56,6 +56,8 @@ pub trait Executor: Sized {
/// before creating futures. This method can be leveraged to set up this
/// global state, call a function, restore the state, and obtain the result
/// of the call.
+ ///
+ /// [`Executor`]: trait.Executor.html
fn enter<R>(&self, f: impl FnOnce() -> R) -> R {
f()
}
diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs
index ab333a20..7a75fc31 100644
--- a/futures/src/subscription.rs
+++ b/futures/src/subscription.rs
@@ -142,6 +142,18 @@ impl<I, O, H> std::fmt::Debug for Subscription<I, O, H> {
///
/// [`Subscription`]: struct.Subscription.html
/// [`Recipe`]: trait.Recipe.html
+///
+/// # Examples
+/// The repository has a couple of [examples] that use a custom [`Recipe`]:
+///
+/// - [`download_progress`], a basic application that asynchronously downloads
+/// a dummy file of 100 MB and tracks the download progress.
+/// - [`stopwatch`], a watch with start/stop and reset buttons showcasing how
+/// to listen to time.
+///
+/// [examples]: https://github.com/hecrj/iced/tree/0.1/examples
+/// [`download_progress`]: https://github.com/hecrj/iced/tree/0.1/examples/download_progress
+/// [`stopwatch`]: https://github.com/hecrj/iced/tree/0.1/examples/stopwatch
pub trait Recipe<Hasher: std::hash::Hasher, Event> {
/// The events that will be produced by a [`Subscription`] with this
/// [`Recipe`].
diff --git a/futures/src/subscription/tracker.rs b/futures/src/subscription/tracker.rs
index efb464b5..c2a0d0f1 100644
--- a/futures/src/subscription/tracker.rs
+++ b/futures/src/subscription/tracker.rs
@@ -131,6 +131,8 @@ where
///
/// This method publishes the given event to all the subscription streams
/// currently open.
+ ///
+ /// [`Recipe::stream`]: trait.Recipe.html#tymethod.stream
pub fn broadcast(&mut self, event: Event) {
self.subscriptions
.values_mut()