embassy-futures

Crates

git

Versions

default

Flavors

embassy_futures::select

Function select

Source
pub fn select<A, B>(a: A, b: B) -> Select<A, B> 
where A: Future, B: Future,
Expand description

Wait for one of two futures to complete.

This function returns a new future which polls all the futures. When one of them completes, it will complete with its result value.

The other future is dropped.