pub trait Sink: Send + Sync {
// Required method
fn render(&self, snap: ProgressSnapshot);
}Expand description
Renders progress snapshots. Implemented by the presentation layer (the CLI’s
TerminalSink), never by domain crates.
A Sink is called on every active Progress::inc, so implementations are
responsible for their own throttling — cheap sinks may repaint every call,
terminal sinks should coalesce redraws.
Required Methods§
Sourcefn render(&self, snap: ProgressSnapshot)
fn render(&self, snap: ProgressSnapshot)
Present the given snapshot. Called on the thread that drove the update;
may be called concurrently from multiple threads, so implementations
must be Sync and manage their own interior state.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".