Skip to main content

resume

Function resume 

Source
pub fn resume<M, I, V, Ty, Info, S>(
    module: &LocalModule<I, V, Ty, Info>,
    machine: &mut M,
) -> Result<()>
where M: HasProgram<Program = ExecutionState<S>> + Dispatch<LocalModule<I, V, Ty, Info>, Instruction = I>,
Expand description

Continue a runnable invocation until halt, root return, suspension, or error.

Fetch establishes the sequential continuation before the Step runs. Program instructions can replace that continuation. A fault or terminal instruction leaves its original position available through ExecutionState::pc().

The caller must supply the same unchanged module used to start the active invocation. This checked API validates accesses, but does not enforce module identity. After an error, earlier operand consumption and effects remain; the caller is responsible for deciding whether the invocation can resume.

A halted or suspended invocation returns successfully without executing any instructions. For a debugger breakpoint, use crate::debugger::resume_with_breaks to resume the suspended invocation.

ยงErrors

Rejects reentrant execution, invalid running state, invalid fetches, PC overflow, or a failure returned by the authored Dispatch/Step.