lucidd/rust-promise

Implement first_of and all functions for tuples.

Opened this issue · 0 comments

It woud look something like this.

fn first_of((a:Future<A>, b: Future<A>)) -> Future<A>;
fn all((a:Future<A>, b: Future<B>)) -> Future<(A, B)>;

first_of is restricted to tuples with only 1 type of Future. This is basically the same as the first_of for Vec but with better match ergonomics for the result.

Both functions should be available for for all tuple sizes.