pub struct Runner<'a> { /* private fields */ }Expand description
Runs plans in a folder, with an agent and a person.
Implementations§
Source§impl<'a> Runner<'a>
impl<'a> Runner<'a>
Sourcepub fn new(
folder: &Path,
agent: &'a dyn Agent,
person: &'a mut dyn Person,
) -> Self
pub fn new( folder: &Path, agent: &'a dyn Agent, person: &'a mut dyn Person, ) -> Self
A runner for plans that work in folder, finding other plans by name in the same folder.
Sourcepub fn plans_in(&mut self, plans: &Path) -> &mut Self
pub fn plans_in(&mut self, plans: &Path) -> &mut Self
Finds the plans that steps name in this folder, name.vpf.json.
Sourcepub fn time_limit(&mut self, limit: Duration) -> &mut Self
pub fn time_limit(&mut self, limit: Duration) -> &mut Self
Ends each run within this time, even when its plan allows more. A run that goes on later has this time again.
Sourcepub fn clock(&mut self, clock: Box<dyn Clock + 'a>) -> &mut Self
pub fn clock(&mut self, clock: Box<dyn Clock + 'a>) -> &mut Self
Reads and waits on this clock instead of the computer’s.
Sourcepub fn keep_records(&mut self, name: &str) -> &mut Self
pub fn keep_records(&mut self, name: &str) -> &mut Self
Keeps a record of each run in the folder’s .vpf/runs, under the plan’s name, and keeps to the plan’s
limits.month across them.
Sourcepub fn detach(&mut self, detach: bool) -> &mut Self
pub fn detach(&mut self, detach: bool) -> &mut Self
Asks no one and waits for no time: whatever a run would ask a person, and any time it would wait for, leaves it waiting, holding nothing, while the steps that do not wait for it go on.
Sourcepub fn at_once(&mut self, most: usize) -> &mut Self
pub fn at_once(&mut self, most: usize) -> &mut Self
Has no more than this many agents and commands work at once, 8 when not told. Steps that wait for none of each other, and the items of a step, are done at the same time up to it.
Sourcepub fn keeper(&mut self, keeper: &'a mut dyn Keeper) -> &mut Self
pub fn keeper(&mut self, keeper: &'a mut dyn Keeper) -> &mut Self
Hands each entry a run keeps to keeper as soon as it is kept, and tells it each record a run begins with,
so that a host keeps the run in its own store.