pub struct ProgressUpdate {
pub id: String,
pub title: String,
pub source: String,
pub progress: Option<u8>,
pub detail: Option<String>,
}Expand description
Event to update progress
Fields§
§id: StringUnique identifier for this progress
title: StringTitle of the operation
source: StringSource of the progress
progress: Option<u8>Progress percentage (0-100) or None for spinner
detail: Option<String>Optional detail text
Implementations§
Source§impl ProgressUpdate
impl ProgressUpdate
Sourcepub fn new(
id: impl Into<String>,
title: impl Into<String>,
source: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, title: impl Into<String>, source: impl Into<String>, ) -> Self
Create a new progress update
Sourcepub const fn with_progress(self, progress: u8) -> Self
pub const fn with_progress(self, progress: u8) -> Self
Set the progress percentage
Sourcepub fn with_detail(self, detail: impl Into<String>) -> Self
pub fn with_detail(self, detail: impl Into<String>) -> Self
Set the detail text
Trait Implementations§
Source§impl Clone for ProgressUpdate
impl Clone for ProgressUpdate
Source§fn clone(&self) -> ProgressUpdate
fn clone(&self) -> ProgressUpdate
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 moreSource§impl Debug for ProgressUpdate
impl Debug for ProgressUpdate
Auto Trait Implementations§
impl Freeze for ProgressUpdate
impl RefUnwindSafe for ProgressUpdate
impl Send for ProgressUpdate
impl Sync for ProgressUpdate
impl Unpin for ProgressUpdate
impl UnwindSafe for ProgressUpdate
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