pub struct ProgressNotification {
pub progress_token: Value,
pub progress: f64,
pub total: Option<f64>,
pub message: Option<String>,
}Expand description
Progress notification for MCP 2025-06-18 protocol
Fields§
§progress_token: ValueProgress token from the original request
progress: f64Current progress value
total: Option<f64>Optional total value
message: Option<String>Optional human-readable message
Implementations§
Source§impl ProgressNotification
impl ProgressNotification
pub fn new(progress_token: Value, progress: f64) -> ProgressNotification
pub fn with_total(self, total: f64) -> ProgressNotification
pub fn with_message(self, message: String) -> ProgressNotification
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 moreSource§impl Debug for ProgressNotification
impl Debug for ProgressNotification
Source§impl Default for ProgressNotification
impl Default for ProgressNotification
Source§fn default() -> ProgressNotification
fn default() -> ProgressNotification
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProgressNotification
impl<'de> Deserialize<'de> for ProgressNotification
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProgressNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProgressNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ProgressNotification
impl Serialize for ProgressNotification
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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