pub async fn select_ab<A, B, FutA, FutB>(a: FutA, b: FutB) -> OptionAb<A, B> where
    FutA: Future<Output = A> + Send + 'static,
    FutB: Future<Output = B> + Send + 'static, 
Expand description

Awaits both futures and returns the value from the one that completes first.

First moves them to the heap, to make them Unpin. Use SelectFuture::new to avoid allocating on the heap.