embassy-futures

Crates

git

Versions

default

Flavors

embassy_futures::select

Function select_slice

Source
pub fn select_slice<'a, Fut: Future>(
    slice: Pin<&'a mut [Fut]>,
) -> SelectSlice<'a, Fut> 
Expand description

Creates a new future which will select over a slice of futures.

The returned future will wait for any future to be ready. Upon completion the item resolved will be returned, along with the index of the future that was ready.

If the slice is empty, the resulting future will be Pending forever.