pub struct ProgressBuilder { /* private fields */ }Expand description
A builder pattern for constructing complex Progress instances.
Use this when you need fine-grained control over initialization, such as setting
a specific start time, or injecting existing Arc<Atomic...> instances for shared
state management.
Implementations§
Source§impl ProgressBuilder
impl ProgressBuilder
Sourcepub fn new_bar(name: impl Into<CompactString>, total: impl Into<u64>) -> Self
pub fn new_bar(name: impl Into<CompactString>, total: impl Into<u64>) -> Self
Starts building a generic Progress Bar (known total).
Sourcepub fn new_spinner(name: impl Into<CompactString>) -> Self
pub fn new_spinner(name: impl Into<CompactString>) -> Self
Starts building a Spinner (indeterminate total).
Sourcepub fn with_atomic_pos(self, atomic_pos: Arc<AtomicU64>) -> Self
pub fn with_atomic_pos(self, atomic_pos: Arc<AtomicU64>) -> Self
Sets a pre-existing atomic counter for position.
This allows multiple Progress instances or external systems to share/update
the same position state.
Sourcepub fn with_atomic_total(self, atomic_total: Arc<AtomicU64>) -> Self
pub fn with_atomic_total(self, atomic_total: Arc<AtomicU64>) -> Self
Sets a pre-existing atomic counter for the total.
Sourcepub fn with_atomic_finished(self, atomic_finished: Arc<AtomicBool>) -> Self
pub fn with_atomic_finished(self, atomic_finished: Arc<AtomicBool>) -> Self
Sets a pre-existing atomic boolean for the finished state.
Sourcepub const fn with_start_time(self, start: Instant) -> Self
pub const fn with_start_time(self, start: Instant) -> Self
Sets the start time explicitly.
Sourcepub fn with_start_time_now(self) -> Self
pub fn with_start_time_now(self) -> Self
Sets the start time to Instant::now().
Trait Implementations§
Source§impl Default for ProgressBuilder
impl Default for ProgressBuilder
Source§fn default() -> ProgressBuilder
fn default() -> ProgressBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProgressBuilder
impl RefUnwindSafe for ProgressBuilder
impl Send for ProgressBuilder
impl Sync for ProgressBuilder
impl Unpin for ProgressBuilder
impl UnwindSafe for ProgressBuilder
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