pub fn block_on_current<F>(
future: F,
) -> Result<<F as Future>::Output, AsyncError>where
F: Future,Expand description
Polls future to completion from inside an async EVM fiber.
If future returns Poll::Pending, the current EVM fiber is suspended and the outer async EVM
future returns Poll::Pending. When the executor wakes and polls the outer future again, the
EVM fiber resumes and continues polling future.
ยงErrors
Returns AsyncError::NotOnFiber if called outside async EVM execution, or
AsyncError::Cancelled if the outer async EVM execution was dropped.