Skip to main content

Module progress

Module progress 

Source
Expand description

UI-agnostic progress reporting. UI-agnostic progress reporting.

The engine performs long-running network and IO work (manifest downloads, concurrent package downloads) but must not depend on any particular UI toolkit. Callers provide a ProgressReporter; a CLI can wire it to indicatif, a GUI can wire it to reactive signals, and tests can use the default NoopProgress.

A ProgressReporter belongs to a client and sees every download it makes. An Operation belongs to one call: it receives a ProgressEvent for each package and Stage of that call, and carries the CancelToken the caller uses to stop it. Neither type needs the io feature, so a client that only stores events can use them without it.

Structs§

CancelToken
A shared flag a caller sets to stop an Operation.
NoopProgress
A ProgressReporter that discards all progress updates.
Operation
The caller’s handle on one engine call: where its progress goes and how to cancel it.
OperationId
Identifies one caller-started operation in the events it emits.
ProgressEvent
One progress report from an Operation.

Enums§

Stage
The stage of work a ProgressEvent describes for one package.
StageUpdate
What happened to a Stage.

Traits§

ProgressHandle
A handle to a single in-flight unit of work.
ProgressReporter
Factory for per-unit-of-work progress handles.
ProgressSink
Receives the ProgressEvents of one Operation.