📃 Reporting

Non-Interruptible Software

fn execute(params: Params) -> Value {
    // ..
}

Interruptible Software

fn execute(params: Params) -> Outcome {
    // ..
}

Outcome

Basic
enum Outcome {
    /// Execution completed, here is the return value.
    Complete(Value),
    /// Execution was interrupted.
    Interrupted,
}
Step Values
enum Outcome {
    /// Execution completed, here is the return value.
    Complete(Value),
    /// Execution was interrupted.
    ///
    /// Here's the information we collected so far.
    Interrupted {
        step_1_value: Option<Step1Value>,
        step_2_value: Option<Step2Value>,
        step_3_value: Option<Step3Value>,
    },
}
Step Values and Execution Info
enum Outcome {
    /// Execution completed, here is the return value.
    Complete(Value),
    /// Execution was interrupted.
    ///
    /// Here's the information we collected so far.
    Interrupted {
        step_1_value: Option<Step1Value>,
        step_2_value: Option<Step2Value>,
        step_3_value: Option<Step3Value>,
        steps_processed: Vec<StepId>,
        steps_not_processed: Vec<StepId>,
    },
}