diff options
Diffstat (limited to 'futures/src/subscription.rs')
-rw-r--r-- | futures/src/subscription.rs | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index e97ff3ab..2dfa523b 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -19,8 +19,7 @@ use crate::BoxStream; /// This type is normally aliased by runtimes with a specific `Event` and/or /// `Hasher`. /// -/// [`Command`]: ../struct.Command.html -/// [`Subscription`]: struct.Subscription.html +/// [`Command`]: crate::Command pub struct Subscription<Hasher, Event, Output> { recipes: Vec<Box<dyn Recipe<Hasher, Event, Output = Output>>>, } @@ -30,8 +29,6 @@ where H: std::hash::Hasher, { /// Returns an empty [`Subscription`] that will not produce any output. - /// - /// [`Subscription`]: struct.Subscription.html pub fn none() -> Self { Self { recipes: Vec::new(), @@ -39,9 +36,6 @@ where } /// Creates a [`Subscription`] from a [`Recipe`] describing it. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html pub fn from_recipe( recipe: impl Recipe<H, E, Output = O> + 'static, ) -> Self { @@ -52,8 +46,6 @@ where /// Batches all the provided subscriptions and returns the resulting /// [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html pub fn batch( subscriptions: impl IntoIterator<Item = Subscription<H, E, O>>, ) -> Self { @@ -66,8 +58,6 @@ where } /// Returns the different recipes of the [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html pub fn recipes(self) -> Vec<Box<dyn Recipe<H, E, Output = O>>> { self.recipes } @@ -75,8 +65,6 @@ where /// Adds a value to the [`Subscription`] context. /// /// The value will be part of the identity of a [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html pub fn with<T>(mut self, value: T) -> Subscription<H, E, (T, O)> where H: 'static, @@ -97,8 +85,6 @@ where } /// Transforms the [`Subscription`] output with the given function. - /// - /// [`Subscription`]: struct.Subscription.html pub fn map<A>(mut self, f: fn(O) -> A) -> Subscription<H, E, A> where H: 'static, @@ -131,9 +117,6 @@ impl<I, O, H> std::fmt::Debug for Subscription<I, O, H> { /// by runtimes to run and identify subscriptions. You can use it to create your /// own! /// -/// [`Subscription`]: struct.Subscription.html -/// [`Recipe`]: trait.Recipe.html -/// /// # Examples /// The repository has a couple of [examples] that use a custom [`Recipe`]: /// @@ -148,17 +131,11 @@ impl<I, O, H> std::fmt::Debug for Subscription<I, O, H> { pub trait Recipe<Hasher: std::hash::Hasher, Event> { /// The events that will be produced by a [`Subscription`] with this /// [`Recipe`]. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html type Output; /// Hashes the [`Recipe`]. /// /// This is used by runtimes to uniquely identify a [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html fn hash(&self, state: &mut Hasher); /// Executes the [`Recipe`] and produces the stream of events of its @@ -166,9 +143,6 @@ pub trait Recipe<Hasher: std::hash::Hasher, Event> { /// /// It receives some stream of generic events, which is normally defined by /// shells. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html fn stream( self: Box<Self>, input: BoxStream<Event>, |