[][src]Function futures::future::join4

Important traits for Join4<Fut1, Fut2, Fut3, Fut4>
pub fn join4<Fut1, Fut2, Fut3, Fut4>(
    future1: Fut1,
    future2: Fut2,
    future3: Fut3,
    future4: Fut4
) -> Join4<Fut1, Fut2, Fut3, Fut4> where
    Fut1: Future,
    Fut2: Future,
    Fut3: Future + Future,
    Fut4: Future

Same as join, but with more futures.

Examples

#![feature(async_await, await_macro)]
use futures::future;

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

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