pub struct ProgressInfo {
pub progress: u64,
pub total: u64,
pub message: String,
pub callback_type: CallbackType,
}
Expand description
Represents information about the progress of an ongoing operation.
This struct is used to convey the current state of progress, including the amount of work completed, the total amount of work, a message describing the current status, and the type of progress update being reported.
§Fields
progress
: Au64
representing the current progress value or the amount of work completed so far.total
: Au64
representing the total progress value or the total amount of work expected.message
: AString
containing a message associated with the progress update, typically used for providing additional information or context about the current operation.callback_type
: An enum of typeCallbackType
that indicates the nature of the progress update, such asCallbackType::Progress
,CallbackType::Info
,CallbackType::Finish
, orCallbackType::Error
.
§Usage
ProgressInfo
is typically used in callback functions to report the status of an operation in real-time,
allowing the caller to monitor progress, handle errors, or perform additional actions based on the state
of the ongoing process.
Fields§
§progress: u64
The current progress value.
total: u64
The total progress value.
message: String
The message associated with the progress update.
callback_type: CallbackType
The type of callback being invoked.
Auto 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