pub struct Recorder { /* private fields */ }Expand description
Everything a set of recordings shares: the open writers and how far each replay has got, keyed by recording name.
Held behind an Arc and shared by every RecorderModel that records into
the same root. Multi-provider routing hands out one Model per provider,
and each of them needs wrapping to be recorded at all — but they must not
each open their own writer for the same file, or the second one to write
truncates the first one’s recording out from under it. One shared state, one
writer per name, appends serialized by that writer’s lock.
Implementations§
Source§impl Recorder
impl Recorder
pub fn new() -> Arc<Self> ⓘ
Sourcepub fn unconsumed(&self) -> Vec<String>
pub fn unconsumed(&self) -> Vec<String>
Report any replay that did not run to the end of what was recorded.
A run that made fewer calls than the recording holds passes every other check — nothing diverged, nothing ran out — while having quietly stopped doing part of the work. Overshooting is already an error at the call that overshoots; this is the other direction, and it can only be asked at the end. Returns one line per unfinished session, empty when every recorded call was replayed — or the only ones left are calls a replay may go without.