Skip to main content

Progress

Trait Progress 

Source
pub trait Progress {
    // Required methods
    fn out(&mut self, line: &str);
    fn err(&mut self, line: &str);

    // Provided methods
    fn transient(&mut self, line: &str) { ... }
    fn clear_transient(&mut self) { ... }
    fn cancelled(&self) -> bool { ... }
}
Expand description

Where a command’s lines go. out is what the CLI prints to stdout, err what it prints to stderr: progress, plans, warnings.

Required Methods§

Source

fn out(&mut self, line: &str)

Source

fn err(&mut self, line: &str)

Provided Methods§

Source

fn transient(&mut self, line: &str)

A line that replaces the previous transient one: the N frames, F fps counter of show video. A terminal redraws it; a job keeps every one.

Source

fn clear_transient(&mut self)

The transient line is finished with.

Source

fn cancelled(&self) -> bool

True once the caller wants the command to stop; polled between steps.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§