Struct fclones::progress::FastProgressBar[][src]

pub struct FastProgressBar { /* fields omitted */ }
Expand description

A wrapper over indicatif::ProgressBar that makes updating its progress lockless. Unfortunately indicatif::ProgressBar wraps state in a Mutex, so updates are slow and can become a bottleneck in multithreaded context. This wrapper uses atomic_counter::RelaxedCounter to keep shared state without ever blocking writers. That state is copied repeatedly by a background thread to an underlying ProgressBar at a low rate.

Implementations

Wrap an existing ProgressBar and start the background updater-thread. The thread periodically copies the FastProgressBar position into the wrapped ProgressBar instance.

Create a new preconfigured animated spinner with given message.

Create a new preconfigured progress bar with given message.

Create a new preconfigured progress bar with given message. Displays progress in bytes.

Creates a new invisible progress bar. This is useful when you need to disable progress bar, but you need to pass an instance of a ProgressBar to something that expects it.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.