pub type ForceTerminator = Box<dyn FnMut(&str) -> bool + Send>;Expand description
The daemon-installed last resort for cancelling a run the world cannot hold: given a run id, it forces that run’s on-disk state to a terminal status and reports whether a run directory existed to act on.
This is what makes a cancel unconditional. Reloader declines whenever a
run can’t be rebuilt - its blueprint was moved or deleted, its metadata is
unreadable, it died mid-spawn before any agent existed - and before this seam
a cancel in that state replied false and wrote nothing, so meta.json kept
claiming running/starting forever and the run could never be got rid of.
The runtime has no notion of the on-disk layout, so the daemon supplies the
writer. Installed with WorldHost::set_force_terminator; without one, a
cancel that misses in the world simply misses (the prior behavior).
Aliased Type§
pub struct ForceTerminator(/* private fields */);