Function futures_util::try_future::try_join5 [−][src]
pub fn try_join5<Fut1, Fut2, Fut3, Fut4, Fut5>(
future1: Fut1,
future2: Fut2,
future3: Fut3,
future4: Fut4,
future5: Fut5
) -> TryJoin5<Fut1, Fut2, Fut3, Fut4, Fut5>ⓘwhereNotable traits for TryJoin5<Fut1, Fut2, Fut3, Fut4, Fut5>
impl<Fut1, Fut2, Fut3, Fut4, Fut5> Future for TryJoin5<Fut1, Fut2, Fut3, Fut4, Fut5> where
Fut1: TryFuture,
Fut2: TryFuture<Error = Fut1::Error>,
Fut3: TryFuture<Error = Fut1::Error>,
Fut4: TryFuture<Error = Fut1::Error>,
Fut5: TryFuture<Error = Fut1::Error>, type Output = Result<(Fut1::Ok, Fut2::Ok, Fut3::Ok, Fut4::Ok, Fut5::Ok), Fut1::Error>;
Fut1: TryFuture,
Fut2: TryFuture<Error = Fut1::Error>,
Fut3: TryFuture<Error = Fut1::Error>,
Fut4: TryFuture<Error = Fut1::Error>,
Fut5: TryFuture<Error = Fut1::Error>,
Same as try_join
, but with more futures.
Examples
use futures::future; let a = future::ready(Ok::<i32, i32>(1)); let b = future::ready(Ok::<i32, i32>(2)); let c = future::ready(Ok::<i32, i32>(3)); let d = future::ready(Ok::<i32, i32>(4)); let e = future::ready(Ok::<i32, i32>(5)); let tuple = future::try_join5(a, b, c, d, e); assert_eq!(tuple.await, Ok((1, 2, 3, 4, 5)));