pub fn now_or_never<F: Future>(future: F) -> Option<F::Output>
Expand description

Consumes a future, polls it once, and immediately returns the output or returns None if it wasn’t ready yet.

This will cancel the future if it’s not ready.