Skip to main content

prepare_report_with_progress

Function prepare_report_with_progress 

Source
pub fn prepare_report_with_progress(
    request: &Request,
    delivery: &Delivery,
    progress: &Progress,
) -> Result<(Report, PendingSave, PerformanceSummary)>
Expand description

Execute a one-shot report, reporting its progress through progress as it runs.

The same contract and the same answer as prepare_report: the handle observes the run and changes nothing about it, so a report prepared with one is byte-for-byte the report prepared without. The caller polls Progress::snapshot from another thread while this blocks, typically to draw a wait indicator. Which phases the run passes through, what the counters mean, and what holds when this returns are documented on Progress; in short, the walk counters equal the returned PerformanceSummary’s walked totals, and a run that requested content analysis leaves analysis at (fresh_files, fresh_files).

A run over a full index ends in ProgressPhase::Summarizing while it builds the answer; a save it started continues in the background, and the caller decides when to join it, as with prepare_report. Saving is therefore shown only for the moment between the save’s start and the answer’s, however long the write takes.