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§
- Cancel
Token - A shared flag a caller sets to stop an
Operation. - Noop
Progress - A
ProgressReporterthat discards all progress updates. - Operation
- The caller’s handle on one engine call: where its progress goes and how to cancel it.
- Operation
Id - Identifies one caller-started operation in the events it emits.
- Progress
Event - One progress report from an
Operation.
Enums§
- Stage
- The stage of work a
ProgressEventdescribes for one package. - Stage
Update - What happened to a
Stage.
Traits§
- Progress
Handle - A handle to a single in-flight unit of work.
- Progress
Reporter - Factory for per-unit-of-work progress handles.
- Progress
Sink - Receives the
ProgressEvents of oneOperation.