pub fn join4<Fut1, Fut2, Fut3, Fut4>(
    future1: Fut1,
    future2: Fut2,
    future3: Fut3,
    future4: Fut4
) -> Join4<Fut1, Fut2, Fut3, Fut4>Notable traits for Join4<Fut1, Fut2, Fut3, Fut4>impl<Fut1: Future, Fut2: Future, Fut3: Future, Fut4: Future> Future for Join4<Fut1, Fut2, Fut3, Fut4> type Output = (Fut1::Output, Fut2::Output, Fut3::Output, Fut4::Output);where
    Fut1: Future,
    Fut2: Future,
    Fut3: Future,
    Fut4: Future,
Expand description

Same as join, but with more futures.

Examples

use futures::future;

let a = async { 1 };
let b = async { 2 };
let c = async { 3 };
let d = async { 4 };
let tuple = future::join4(a, b, c, d);

assert_eq!(tuple.await, (1, 2, 3, 4));