diff options
author | 2023-09-09 21:16:55 +0200 | |
---|---|---|
committer | 2023-09-09 21:16:55 +0200 | |
commit | e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9 (patch) | |
tree | 2fd3b5f27ff4ac185a105ddce1a8f26b1b5b276b /futures/src/subscription | |
parent | 89d9c45d25e9bf89e48858b135bc7a2d41c757a8 (diff) | |
parent | 419d9374b79b39293ba9a17967c2356d29377d8f (diff) | |
download | iced-e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9.tar.gz iced-e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9.tar.bz2 iced-e3aa8f71e6d27135ddc3bddf2a141fe42375b3f9.zip |
Merge pull request #2077 from matze/fix-doc-links
Fix majority of unresolved documentation links
Diffstat (limited to '')
-rw-r--r-- | futures/src/subscription.rs | 6 | ||||
-rw-r--r-- | futures/src/subscription/tracker.rs | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index 759dd223..d40125e3 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -19,16 +19,14 @@ pub type EventStream = BoxStream<(Event, event::Status)>; /// A request to listen to external events. /// -/// Besides performing async actions on demand with [`Command`], most +/// Besides performing async actions on demand with `Command`, most /// applications also need to listen to external events passively. /// -/// A [`Subscription`] is normally provided to some runtime, like a [`Command`], +/// A [`Subscription`] is normally provided to some runtime, like a `Command`, /// and it will generate events as long as the user keeps requesting it. /// /// For instance, you can use a [`Subscription`] to listen to a WebSocket /// connection, keyboard presses, mouse events, time ticks, etc. -/// -/// [`Command`]: crate::Command #[must_use = "`Subscription` must be returned to runtime to take effect"] pub struct Subscription<Message> { recipes: Vec<Box<dyn Recipe<Output = Message>>>, diff --git a/futures/src/subscription/tracker.rs b/futures/src/subscription/tracker.rs index ae71cd25..3a83da09 100644 --- a/futures/src/subscription/tracker.rs +++ b/futures/src/subscription/tracker.rs @@ -14,6 +14,8 @@ use std::hash::Hasher as _; /// If you have an application that continuously returns a [`Subscription`], /// you can use a [`Tracker`] to keep track of the different recipes and keep /// its executions alive. +/// +/// [`Subscription`]: crate::Subscription #[derive(Debug, Default)] pub struct Tracker { subscriptions: HashMap<u64, Execution>, @@ -51,6 +53,7 @@ impl Tracker { /// the [`Tracker`] changes. /// /// [`Recipe`]: crate::subscription::Recipe + /// [`Subscription`]: crate::Subscription pub fn update<Message, Receiver>( &mut self, recipes: impl Iterator<Item = Box<dyn Recipe<Output = Message>>>, |