pub(crate) fn now_or_never<F: Future>(fut: F) -> Option<F::Output>
Expand description
Poll the future once and return Some
if it is ready, else None
.
If the future wasn’t ready, it future likely can’t be driven to completion any more: the polling uses a no-op waker, so knowledge of what the pending future was waiting for is lost.