Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
This commit is contained in:
parent
d612bf5678
commit
01322f69a4
135 changed files with 135 additions and 1769 deletions
|
|
@ -8,11 +8,6 @@ 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!
|
||||
///
|
||||
/// [`Runtime`]: struct.Runtime.html
|
||||
/// [`Executor`]: executor/trait.Executor.html
|
||||
/// [`Command`]: struct.Command.html
|
||||
/// [`Subscription`]: subscription/struct.Subscription.html
|
||||
#[derive(Debug)]
|
||||
pub struct Runtime<Hasher, Event, Executor, Sender, Message> {
|
||||
executor: Executor,
|
||||
|
|
@ -36,8 +31,6 @@ where
|
|||
/// You need to provide:
|
||||
/// - an [`Executor`] to spawn futures
|
||||
/// - a `Sender` implementing `Sink` to receive the results
|
||||
///
|
||||
/// [`Runtime`]: struct.Runtime.html
|
||||
pub fn new(executor: Executor, sender: Sender) -> Self {
|
||||
Self {
|
||||
executor,
|
||||
|
|
@ -50,10 +43,6 @@ where
|
|||
/// Runs the given closure inside the [`Executor`] of the [`Runtime`].
|
||||
///
|
||||
/// See [`Executor::enter`] to learn more.
|
||||
///
|
||||
/// [`Executor`]: executor/trait.Executor.html
|
||||
/// [`Runtime`]: struct.Runtime.html
|
||||
/// [`Executor::enter`]: executor/trait.Executor.html#method.enter
|
||||
pub fn enter<R>(&self, f: impl FnOnce() -> R) -> R {
|
||||
self.executor.enter(f)
|
||||
}
|
||||
|
|
@ -62,9 +51,6 @@ where
|
|||
///
|
||||
/// The resulting `Message` will be forwarded to the `Sender` of the
|
||||
/// [`Runtime`].
|
||||
///
|
||||
/// [`Command`]: struct.Command.html
|
||||
/// [`Runtime`]: struct.Runtime.html
|
||||
pub fn spawn(&mut self, command: Command<Message>) {
|
||||
use futures::{FutureExt, SinkExt};
|
||||
|
||||
|
|
@ -88,9 +74,7 @@ where
|
|||
/// It will spawn new streams or close old ones as necessary! See
|
||||
/// [`Tracker::update`] to learn more about this!
|
||||
///
|
||||
/// [`Subscription`]: subscription/struct.Subscription.html
|
||||
/// [`Runtime`]: struct.Runtime.html
|
||||
/// [`Tracker::update`]: subscription/struct.Tracker.html#method.update
|
||||
/// [`Tracker::update`]: subscription::Tracker::update
|
||||
pub fn track(
|
||||
&mut self,
|
||||
subscription: Subscription<Hasher, Event, Message>,
|
||||
|
|
@ -115,9 +99,7 @@ where
|
|||
///
|
||||
/// See [`Tracker::broadcast`] to learn more.
|
||||
///
|
||||
/// [`Runtime`]: struct.Runtime.html
|
||||
/// [`Tracker::broadcast`]:
|
||||
/// subscription/struct.Tracker.html#method.broadcast
|
||||
/// [`Tracker::broadcast`]: subscription::Tracker::broadcast
|
||||
pub fn broadcast(&mut self, event: Event) {
|
||||
self.subscriptions.broadcast(event);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue