pub struct Recorder {
pub steps: Vec<RecordedStep>,
pub dropped: usize,
pub ran: BTreeMap<usize, Vec<(String, Value)>>,
/* private fields */
}Expand description
The steps recorded since recording started.
Fields§
§steps: Vec<RecordedStep>§dropped: usizeSteps not kept because the recording reached RECORD_LIMIT or RECORD_MAX_BYTES.
Once a step is dropped, every later one is too, so steps is always the beginning of
what ran, never a sequence with gaps.
ran: BTreeMap<usize, Vec<(String, Value)>>What a step ran, by its index in steps, for a command that runs steps stored in the
workbook (automate.runScript, macro.run): the commands as they ran, so a recording
keeps them even when the script or macro is edited or deleted before the recording stops.
A run without an entry is left out when the recording is used.
Implementations§
Source§impl Recorder
impl Recorder
Sourcepub fn push(&mut self, step: RecordedStep) -> bool
pub fn push(&mut self, step: RecordedStep) -> bool
Adds a step, or counts it as dropped once the buffer is full; true when it was kept.
Sourcepub fn attach_ran(&mut self, steps: Vec<(String, Json)>)
pub fn attach_ran(&mut self, steps: Vec<(String, Json)>)
Attaches what the last kept step ran (Recorder::ran), within the byte budget: past it,
the step stays without it, and the recording leaves the run out and lists it as skipped.