IIUC, when used with a mutable reference to a future (&mut Fut), now_or_never effectively polls Fut (similar to the poll! macro but without needing an async context). In the event of a None, the future is still guaranteed to eventually complete if awaited on or if it's a tokio join handle or something (assuming it's not otherwise aborted and doesn't run forever), so there's no sense in which not completing now means it will "never" complete.
This is sometimes extremely useful (arguably moreso than calling it on a future by value) and there doesn't seem to be any other safe method which provides the same functionality, but the naming is pretty misleading and the docs don't clarify this behavior at all.
IIUC, when used with a mutable reference to a future (
&mut Fut
),now_or_never
effectively pollsFut
(similar to thepoll!
macro but without needing an async context). In the event of aNone
, the future is still guaranteed to eventually complete if awaited on or if it's a tokio join handle or something (assuming it's not otherwise aborted and doesn't run forever), so there's no sense in which not completing now means it will "never" complete.This is sometimes extremely useful (arguably moreso than calling it on a future by value) and there doesn't seem to be any other safe method which provides the same functionality, but the naming is pretty misleading and the docs don't clarify this behavior at all.