|
8 | 8 | //! operations converts multiple future into a single future that returns the
|
9 | 9 | //! first output.
|
10 | 10 | //!
|
11 |
| -//! For operating on futures the following macros can be used: |
| 11 | +//! For operating on futures the following functions can be used: |
12 | 12 | //!
|
13 | 13 | //! | Name | Return signature | When does it return? |
|
14 | 14 | //! | --- | --- | --- |
|
15 |
| -//! | [`future::join!`] | `(T1, T2)` | Wait for all to complete |
| 15 | +//! | [`Future::join`] | `(T1, T2)` | Wait for all to complete |
16 | 16 | //! | [`Future::race`] | `T` | Return on first value
|
17 | 17 | //!
|
18 | 18 | //! ## Fallible Futures Concurrency
|
19 | 19 | //!
|
20 | 20 | //! For operating on futures that return `Result` additional `try_` variants of
|
21 |
| -//! the macros mentioned before can be used. These macros are aware of `Result`, |
| 21 | +//! the functions mentioned before can be used. These functions are aware of `Result`, |
22 | 22 | //! and will behave slightly differently from their base variants.
|
23 | 23 | //!
|
24 | 24 | //! In the case of `try_join`, if any of the futures returns `Err` all
|
|
30 | 30 | //! means `try_race` will keep going until any one of the futures returns
|
31 | 31 | //! `Ok`, or _all_ futures have returned `Err`.
|
32 | 32 | //!
|
33 |
| -//! However sometimes it can be useful to use the base variants of the macros |
| 33 | +//! However sometimes it can be useful to use the base variants of the functions |
34 | 34 | //! even on futures that return `Result`. Here is an overview of operations that
|
35 | 35 | //! work on `Result`, and their respective semantics:
|
36 | 36 | //!
|
37 | 37 | //! | Name | Return signature | When does it return? |
|
38 | 38 | //! | --- | --- | --- |
|
39 |
| -//! | [`future::join!`] | `(Result<T, E>, Result<T, E>)` | Wait for all to complete |
40 |
| -//! | [`future::try_join!`] | `Result<(T1, T2), E>` | Return on first `Err`, wait for all to complete |
| 39 | +//! | [`Future::join`] | `(Result<T, E>, Result<T, E>)` | Wait for all to complete |
| 40 | +//! | [`Future::try_join`] | `Result<(T1, T2), E>` | Return on first `Err`, wait for all to complete |
41 | 41 | //! | [`Future::race`] | `Result<T, E>` | Return on first value
|
42 | 42 | //! | [`Future::try_race`] | `Result<T, E>` | Return on first `Ok`, reject on last Err
|
43 | 43 | //!
|
44 |
| -//! [`future::join!`]: macro.join.html |
45 |
| -//! [`future::try_join!`]: macro.try_join.html |
| 44 | +//! [`Future::join`]: trait.Future.html#method.join |
| 45 | +//! [`Future::try_join`]: trait.Future.html#method.try_join |
46 | 46 | //! [`Future::race`]: trait.Future.html#method.race
|
47 | 47 | //! [`Future::try_race`]: trait.Future.html#method.try_race
|
48 | 48 |
|
|
0 commit comments