pub struct ProgressNotification {
pub id: String,
pub title: String,
pub source: String,
pub progress: Option<u8>,
pub detail: Option<String>,
pub complete: bool,
}Expand description
A progress notification
Fields§
§id: StringUnique identifier
title: StringTitle of the operation (e.g., “Building”, “Indexing”)
source: StringSource of the progress (e.g., “cargo”, “rust-analyzer”)
progress: Option<u8>Progress percentage (0-100) or None for indeterminate spinner
detail: Option<String>Optional detail text (e.g., “4/250 (core)”)
complete: boolWhether the operation is complete
Implementations§
Source§impl ProgressNotification
impl ProgressNotification
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 notification
Sourcepub fn with_progress(self, progress: u8) -> Self
pub 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
Sourcepub const fn is_indeterminate(&self) -> bool
pub const fn is_indeterminate(&self) -> bool
Check if this is an indeterminate (spinner) progress
Trait Implementations§
Source§impl Clone for ProgressNotification
impl Clone for ProgressNotification
Source§fn clone(&self) -> ProgressNotification
fn clone(&self) -> ProgressNotification
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 ProgressNotification
impl RefUnwindSafe for ProgressNotification
impl Send for ProgressNotification
impl Sync for ProgressNotification
impl Unpin for ProgressNotification
impl UnwindSafe for ProgressNotification
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