pub struct ProgressInfo {
pub total_jobs: usize,
pub completed_jobs: usize,
pub failed_jobs: usize,
pub running_jobs: usize,
pub start_time: Instant,
pub estimated_remaining: Option<Duration>,
pub throughput: f64,
}Expand description
Progress information for a batch operation
Fields§
§total_jobs: usizeTotal number of jobs
completed_jobs: usizeNumber of completed jobs
failed_jobs: usizeNumber of failed jobs
running_jobs: usizeNumber of jobs currently running
start_time: InstantStart time of the batch
estimated_remaining: Option<Duration>Estimated time remaining
throughput: f64Current throughput (jobs per second)
Implementations§
Source§impl ProgressInfo
impl ProgressInfo
Sourcepub fn percentage(&self) -> f64
pub fn percentage(&self) -> f64
Get progress percentage (0.0 - 100.0)
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if batch is complete
Sourcepub fn calculate_eta(&self) -> Option<Duration>
pub fn calculate_eta(&self) -> Option<Duration>
Calculate estimated time remaining
Sourcepub fn format_progress(&self) -> String
pub fn format_progress(&self) -> String
Format progress as a string
Sourcepub fn format_eta(&self) -> String
pub fn format_eta(&self) -> String
Format ETA as a string
Trait Implementations§
Source§impl Clone for ProgressInfo
impl Clone for ProgressInfo
Source§fn clone(&self) -> ProgressInfo
fn clone(&self) -> ProgressInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProgressInfo
impl RefUnwindSafe for ProgressInfo
impl Send for ProgressInfo
impl Sync for ProgressInfo
impl Unpin for ProgressInfo
impl UnwindSafe for ProgressInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more