pub trait ProgressColumn:
Send
+ Sync
+ Debug {
// Required method
fn render(&self, task: &Task) -> Vec<Span>;
// Provided methods
fn render_with_width(
&self,
task: &Task,
_available_width: Option<usize>,
) -> Vec<Span> { ... }
fn is_expandable(&self) -> bool { ... }
fn min_width(&self) -> usize { ... }
}Expand description
A trait for rendering a column in a progress bar.
Required Methods§
Provided Methods§
Sourcefn render_with_width(
&self,
task: &Task,
_available_width: Option<usize>,
) -> Vec<Span>
fn render_with_width( &self, task: &Task, _available_width: Option<usize>, ) -> Vec<Span>
Render the column with an available width hint.
Columns that can expand (like BarColumn with expand: true) should
override this to use the provided width. Default implementation
ignores the width and calls render().
Sourcefn is_expandable(&self) -> bool
fn is_expandable(&self) -> bool
Returns true if this column should expand to fill available width.