pub struct ProgressNotification {
pub progress_token: ProgressToken,
pub progress: f64,
pub total: Option<u64>,
}Expand description
Progress notification for long-running operations.
Fields§
§progress_token: ProgressTokenProgress token for this operation
progress: f64Current progress (0.0 to 1.0)
total: Option<u64>Total number of items (if known)
Implementations§
Source§impl ProgressNotification
impl ProgressNotification
Sourcepub fn new(progress_token: impl Into<ProgressToken>, progress: f64) -> Self
pub fn new(progress_token: impl Into<ProgressToken>, progress: f64) -> Self
Create a new progress notification.
Sourcepub fn with_total(
progress_token: impl Into<ProgressToken>,
progress: f64,
total: u64,
) -> Self
pub fn with_total( progress_token: impl Into<ProgressToken>, progress: f64, total: u64, ) -> Self
Create a progress notification with a total count.
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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgressNotification
impl Debug for ProgressNotification
Source§impl<'de> Deserialize<'de> for ProgressNotification
impl<'de> Deserialize<'de> for ProgressNotification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProgressNotification
impl PartialEq for ProgressNotification
Source§impl Serialize for ProgressNotification
impl Serialize for ProgressNotification
impl StructuralPartialEq for ProgressNotification
Auto 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