Skip to main content

resume

Function resume 

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

Continue an invocation until Halt/root return or an 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.

ยงErrors

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