pub struct CancelledNotification {
pub params: CancelledNotificationParams,
/* private fields */
}Expand description
This notification can be sent by either side to indicate that it is cancelling a previously-issued request. The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished. This notification indicates that the result will be unused, so any associated processing SHOULD cease. A client MUST NOT attempt to cancel its initialize request. For task cancellation, use the tasks/cancel request instead of this notification.
JSON schema
{
"description": "This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n\nThe request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n\nThis notification indicates that the result will be unused, so any associated processing SHOULD cease.\n\nA client MUST NOT attempt to cancel its initialize request.\n\nFor task cancellation, use the tasks/cancel request instead of this notification.",
"type": "object",
"required": [
"jsonrpc",
"method",
"params"
],
"properties": {
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string",
"const": "notifications/cancelled"
},
"params": {
"$ref": "#/$defs/CancelledNotificationParams"
}
}
}Fields§
§params: CancelledNotificationParamsImplementations§
Source§impl CancelledNotification
impl CancelledNotification
pub fn new(params: CancelledNotificationParams) -> Self
pub fn jsonrpc(&self) -> &String
pub fn method(&self) -> &String
Sourcepub fn method_value() -> &'static str
pub fn method_value() -> &'static str
returns “notifications/cancelled”
pub fn method_name() -> &'static str
👎Deprecated since 0.8.0: Use
method_value() instead.Trait Implementations§
Source§impl Clone for CancelledNotification
impl Clone for CancelledNotification
Source§fn clone(&self) -> CancelledNotification
fn clone(&self) -> CancelledNotification
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 CancelledNotification
impl Debug for CancelledNotification
Source§impl<'de> Deserialize<'de> for CancelledNotification
impl<'de> Deserialize<'de> for CancelledNotification
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 From<CancelledNotification> for ClientNotification
impl From<CancelledNotification> for ClientNotification
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Source§impl From<CancelledNotification> for ServerNotification
impl From<CancelledNotification> for ServerNotification
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CancelledNotification
impl RefUnwindSafe for CancelledNotification
impl Send for CancelledNotification
impl Sync for CancelledNotification
impl Unpin for CancelledNotification
impl UnwindSafe for CancelledNotification
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