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.
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.",
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"const": "notifications/cancelled"
},
"params": {
"type": "object",
"required": [
"requestId"
],
"properties": {
"reason": {
"description": "An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.",
"type": "string"
},
"requestId": {
"description": "The ID of the request to cancel.\n\nThis MUST correspond to the ID of a request previously issued in the same direction.",
"$ref": "#/definitions/RequestId"
}
}
}
}
}
Fields§
§params: CancelledNotificationParams
Implementations§
Source§impl CancelledNotification
impl CancelledNotification
pub fn new(params: CancelledNotificationParams) -> Self
pub fn method(&self) -> &String
pub fn method_name() -> String
Trait Implementations§
Source§impl Clone for CancelledNotification
impl Clone for CancelledNotification
Source§fn clone(&self) -> CancelledNotification
fn clone(&self) -> CancelledNotification
Returns a copy 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 ClientJsonrpcNotification
impl From<CancelledNotification> for ClientJsonrpcNotification
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
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 MessageFromClient
impl From<CancelledNotification> for MessageFromClient
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Source§impl From<CancelledNotification> for MessageFromServer
impl From<CancelledNotification> for MessageFromServer
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Source§impl From<CancelledNotification> for NotificationFromClient
impl From<CancelledNotification> for NotificationFromClient
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Source§impl From<CancelledNotification> for NotificationFromServer
impl From<CancelledNotification> for NotificationFromServer
Source§fn from(value: CancelledNotification) -> Self
fn from(value: CancelledNotification) -> Self
Converts to this type from the input type.
Source§impl From<CancelledNotification> for ServerJsonrpcNotification
impl From<CancelledNotification> for ServerJsonrpcNotification
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.
Source§impl FromMessage<CancelledNotification> for ClientMessage
impl FromMessage<CancelledNotification> for ClientMessage
fn from_message( message: CancelledNotification, request_id: Option<RequestId>, ) -> Result<Self, JsonrpcErrorError>
Source§impl FromMessage<CancelledNotification> for ServerMessage
impl FromMessage<CancelledNotification> for ServerMessage
fn from_message( message: CancelledNotification, request_id: Option<RequestId>, ) -> Result<Self, JsonrpcErrorError>
Source§impl Serialize for CancelledNotification
impl Serialize for CancelledNotification
Source§impl ToMessage<ClientMessage> for CancelledNotification
impl ToMessage<ClientMessage> for CancelledNotification
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ClientMessage, JsonrpcErrorError>
Source§impl ToMessage<ServerMessage> for CancelledNotification
impl ToMessage<ServerMessage> for CancelledNotification
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ServerMessage, JsonrpcErrorError>
Source§impl TryFrom<NotificationFromClient> for CancelledNotification
impl TryFrom<NotificationFromClient> for CancelledNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<NotificationFromServer> for CancelledNotification
impl TryFrom<NotificationFromServer> for CancelledNotification
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
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