Debian Codegraph @

src/prelude.rs

raw symbols SCIP
1 //! This module has extras that clash with names in [`futures-lite`],
2 //! which depends on us.
3 pub use craterust-analyzer cargo futures-micro 1.0.0-rc0 crate/::*;
4
5 /// Zips two futures, waiting for both to complete.
6 ///
7 /// # Examples
8 ///
9 /// ```
10 /// use futures_micro::prelude::zip;
11 ///
12 /// # futures_lite::future::block_on(async {
13 /// let a = async { 1 };
14 /// let b = async { 2 };
15 ///
16 /// assert_eq!(zip(a, b).await, (1, 2));
17 /// # })
18 /// ```
19 pub fn ziprust-analyzer cargo futures-micro 1.0.0-rc0 prelude/zip().<F1, F2>(f1: F1, f2: F2) -> Ziprust-analyzer cargo futures-micro 1.0.0-rc0 Zip#<F1, F2>
20 where
21 F1: Futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#,
22 F2: Futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#,
23 {
24 Ziprust-analyzer cargo futures-micro 1.0.0-rc0 Zip#::newrust-analyzer cargo futures-micro 1.0.0-rc0 impl#[`Zip<F1, F2>`]new().(f1, f2)
25 }
26
27 /// Returns the result of `left` or `right` future, preferring `left` if both are ready.
28 pub fn orrust-analyzer cargo futures-micro 1.0.0-rc0 prelude/or().<F1, F2>(future1: F1, future2: F2) -> Orrust-analyzer cargo futures-micro 1.0.0-rc0 Or#<F1, F2>
29 where
30 F1: Futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#,
31 F2: Futurerust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#,
32 {
33 Orrust-analyzer cargo futures-micro 1.0.0-rc0 Or# { future1rust-analyzer cargo futures-micro 1.0.0-rc0 Or#future1., future2rust-analyzer cargo futures-micro 1.0.0-rc0 Or#future2. }
34 }