Skip to main content

on_fiber_result_with_stack

Function on_fiber_result_with_stack 

Source
pub unsafe fn on_fiber_result_with_stack<'a, R, E>(
    stack: NonNull<FiberStack>,
    func: impl FnOnce() -> Result<R, E> + 'a,
) -> impl Future<Output = AsyncResult<R, E>> + Send + 'a
where R: Send + 'a, E: Send + 'a,
Expand description

Runs func on a native fiber backed by a reusable EVM stack slot.

ยงSafety

stack must point to valid stack storage for the lifetime of the returned future. That storage must not be accessed by anything else until the returned future is dropped.