Function cros_async::complete4

source ·
pub async fn complete4<F1, F2, F3, F4>(
    f1: F1,
    f2: F2,
    f3: F3,
    f4: F4
) -> (F1::Output, F2::Output, F3::Output, F4::Output)where
    F1: Future,
    F2: Future,
    F3: Future,
    F4: Future,
Expand description

Creates a combinator that runs the four given futures to completion, returning a tuple of the outputs each yields.

Example

use cros_async::{complete4, block_on};

let first = async {5};
let second = async {6};
let third = async {7};
let fourth = async {8};
assert_eq!(block_on(complete4(first, second, third, fourth)), (5,6,7,8));