pub enum ScriptOutcome {
Applied,
NoChange {
detail: Option<String>,
},
Failed {
error: ScriptError,
},
Refused {
detail: String,
},
}Expand description
What one script call did, once the point it was bound to had its say.
The distinction the outcomes exist to draw: a script that ran and asked for nothing, a script that never ran, and a script that asked for something it may not do all leave the engine in the same state. Only a record can tell them apart, and “the extension is inert” versus “the extension is being held back” is exactly the question an operator asks.
Variants§
Applied
The script ran and the point took its answer.
Taken, not necessarily different: a script that answers with the value a field already holds still gets this. What a point can honestly report is whether it acted on what it was told, and an observer script that deliberately changes nothing should still read as having run.
NoChange
The script ran and the point is as it was — because the script asked
for no change, or because it answered in a shape this point cannot act
on. Those two are one outcome on purpose: most points define them to
mean the same thing, and detail says which it was where the point
can tell.
Failed
The call itself did not complete.
Fields
error: ScriptErrorRefused
The script asked for something its origin does not permit. One record per refused edit, so a pass that was half permitted reads as one.