Skip to main content

IndicatifProgress

Struct IndicatifProgress 

Source
pub struct IndicatifProgress { /* private fields */ }
Expand description

Default ProgressTracker implementation backed by indicatif::MultiProgress.

Renders one bar per table on stderr. Bars are pre-allocated in ProgressTracker::register and are looked up by Table on each ProgressTracker::increment call. Lookup uses a RwLock read on the increment path; this is uncontended after the serial register phase completes.

Implementations§

Source§

impl IndicatifProgress

Source

pub fn new() -> Self

Construct an empty tracker. Tables are added via ProgressTracker::register.

Source

pub fn log_writer(&self) -> Box<dyn Write + Send + 'static>

Return a writer that coordinates stderr log writes with progress bar redraws.

Trait Implementations§

Source§

impl Debug for IndicatifProgress

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IndicatifProgress

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl ProgressTracker for IndicatifProgress

Source§

fn register(&self, table: Table, total_units: u64)

Pre-register a table with its total expected output-unit count. Read more
Source§

fn increment(&self, table: Table, units: u64)

Advance the counter for table by units output units. Read more
Source§

fn finish(&self)

Called once after the last Self::increment on the success path. Implementations should use this for normal success cleanup and Drop only as an error or panic fallback. The default does nothing.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.