pub struct ProgressInfo {
pub progress: f64,
pub current_step: usize,
pub total_steps: Option<usize>,
pub elapsed: Duration,
pub eta: Option<Duration>,
pub current_metric: Option<f64>,
pub message: String,
}Expand description
Progress information for long-running operations
Fields§
§progress: f64Current progress (0.0 to 1.0)
current_step: usizeCurrent step/iteration
total_steps: Option<usize>Total steps (if known)
elapsed: DurationElapsed time
eta: Option<Duration>Estimated time remaining
current_metric: Option<f64>Current metric value (e.g., loss, accuracy)
message: StringAdditional status message
Implementations§
Source§impl ProgressInfo
impl ProgressInfo
Sourcepub fn with_total_steps(self, total: usize) -> Self
pub fn with_total_steps(self, total: usize) -> Self
Set total steps
Sourcepub fn with_elapsed(self, elapsed: Duration) -> Self
pub fn with_elapsed(self, elapsed: Duration) -> Self
Set elapsed time
Sourcepub fn with_metric(self, metric: f64) -> Self
pub fn with_metric(self, metric: f64) -> Self
Set current metric value
Sourcepub fn with_message<S: Into<String>>(self, message: S) -> Self
pub fn with_message<S: Into<String>>(self, message: S) -> Self
Set status message
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> 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