pub struct StopRecord {
pub label: String,
pub kind: StopKind,
pub key: Option<String>,
pub command: String,
pub args: Vec<Value>,
pub values: Vec<Vec<String>>,
pub ret: Option<Value>,
}Expand description
A record of a stop point (one history entry; Vm::history).
Holds the original and the evaluated values. Does not hold translations after replacement (so the history can be re-rendered in the current language even after switching languages).
Fields§
§label: StringThe label of the stop point (module.label).
kind: StopKindThe kind of stop point (a sugar, or an @ command). Used to re-render the body in the current language
(Vm::render).
key: Option<String>module.label#id (None for stop points without a stable ID and for choices).
command: StringThe name of the command it stopped at (the name in the registry).
args: Vec<Value>The arguments of the stop notification (the evaluated original, before replacement).
values: Vec<Vec<String>>The evaluated values of ${expr} (strings) for each body. Bodies are in the order evaluated. A plain or quote line has
one body, a choice has one per option included in the list, and a stop command has one per string literal argument
(empty if there is no ${expr}).
ret: Option<Value>The return value passed on resume (Vm::resume). None for stop points not yet resumed and for those whose return
value is (). For a choice, the number in the given list (Int). Included in saves and undone by rollback.