Lines Matching full:either
2 use crate::future::{Either, FutureExt};
16 /// Waits for either one of two differently-typed futures to complete.
18 /// This function will return a new future which awaits for either one of both
26 /// output type you can use the `Either::factor_first` method to
37 /// future::Either,
55 /// Either::Left((value1, _)) => value1, // `value1` is resolved from `future1`
57 /// Either::Right((value2, _)) => value2, // `value2` is resolved from `future2`
68 /// use futures::future::{self, Either, Future, FutureExt};
76 /// future::select(a, b).then(|either| {
77 /// match either {
78 /// Either::Left((x, b)) => b.map(move |y| (x, y)).left_future(),
79 /// Either::Right((y, a)) => a.map(move |x| (x, y)).right_future(),
89 assert_future::<Either<(A::Output, B), (B::Output, A)>, _>(Select { in select()
99 type Output = Either<(A::Output, B), (B::Output, A)>;
115 return Poll::Ready(Either::Left((val, unwrap_option(self.inner.take()).1))); in poll()
119 return Poll::Ready(Either::Right((val, unwrap_option(self.inner.take()).0))); in poll()