Futures_lite: Vec<impl Future{Output = T}> to impl Future{ Output = Vec<T> }?

I am using Future in core::future - Rust

I have a x: Vec<impl Future{Output = T}> . How do I convert this to a impl Future {Output = Vec<T>} ?

In particular, I am looking for something that awaits on all the elements of the Vec in parallel and then puts it into a Vec.

Sounds like you are looking for this? futures::future::join_all

1 Like

Does this exist in futures_lite ?

there is zip in futures_lite::future - Rust which seems to behave like join, but there is no zip_all

Not as far as I know.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.