pub struct RenderableColumn { /* private fields */ }Expand description
A column that renders an arbitrary Renderable from the task’s fields.
This is the most flexible column type, allowing custom rendering logic via a closure that extracts a renderable from the task state.
Implementations§
Source§impl RenderableColumn
impl RenderableColumn
Sourcepub fn new(
f: impl Fn(&ProgressTask) -> Box<dyn Renderable + Send + Sync> + Send + Sync + 'static,
) -> Self
pub fn new( f: impl Fn(&ProgressTask) -> Box<dyn Renderable + Send + Sync> + Send + Sync + 'static, ) -> Self
Create a new RenderableColumn with a render function.
The function receives a ProgressTask reference and should return
a boxed Renderable to display in the column.
Sourcepub fn with_no_wrap(self, no_wrap: bool) -> Self
pub fn with_no_wrap(self, no_wrap: bool) -> Self
Set whether the column should avoid wrapping.
Sourcepub fn with_justify(self, justify: JustifyMethod) -> Self
pub fn with_justify(self, justify: JustifyMethod) -> Self
Set the column justification.
Trait Implementations§
Source§impl Debug for RenderableColumn
impl Debug for RenderableColumn
Source§impl ProgressColumn for RenderableColumn
impl ProgressColumn for RenderableColumn
fn table_column(&self) -> Column
fn render( &self, task: &ProgressTask, _now: f64, _options: &ConsoleOptions, ) -> Box<dyn Renderable + Send + Sync>
fn max_refresh(&self) -> Option<Duration>
Auto Trait Implementations§
impl Freeze for RenderableColumn
impl !RefUnwindSafe for RenderableColumn
impl Send for RenderableColumn
impl Sync for RenderableColumn
impl Unpin for RenderableColumn
impl !UnwindSafe for RenderableColumn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more