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
|
|
@ -38,21 +38,15 @@ use futures::Future;
|
|||
/// A type that can run futures.
|
||||
pub trait Executor: Sized {
|
||||
/// Creates a new [`Executor`].
|
||||
///
|
||||
/// [`Executor`]: trait.Executor.html
|
||||
fn new() -> Result<Self, futures::io::Error>
|
||||
where
|
||||
Self: Sized;
|
||||
|
||||
/// Spawns a future in the [`Executor`].
|
||||
///
|
||||
/// [`Executor`]: trait.Executor.html
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn spawn(&self, future: impl Future<Output = ()> + Send + 'static);
|
||||
|
||||
/// Spawns a local future in the [`Executor`].
|
||||
///
|
||||
/// [`Executor`]: trait.Executor.html
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn spawn(&self, future: impl Future<Output = ()> + 'static);
|
||||
|
||||
|
|
@ -62,8 +56,6 @@ 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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue