Skip to main content

CustomProgressColumn

Trait CustomProgressColumn 

Source
pub trait CustomProgressColumn: Send + Sync {
    // Required method
    fn render(&self, task: &Task) -> Cell;

    // Provided methods
    fn table_column(&self) -> ColumnOptions { ... }
    fn max_refresh(&self) -> Option<f64> { ... }
}
Expand description

A user-defined progress column. Port of subclassing upstream’s abstract ProgressColumn: implement render, and optionally the table column and max_refresh.

Required Methods§

Source

fn render(&self, task: &Task) -> Cell

The cell for task. Port of ProgressColumn.render.

Provided Methods§

Source

fn table_column(&self) -> ColumnOptions

The grid column this column occupies. Port of get_table_column (upstream’s default Column()).

Source

fn max_refresh(&self) -> Option<f64>

Reuse a render younger than this many seconds (upstream max_refresh, default None: render every time). As upstream, the cache is only consulted while the task has completed nothing.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§