pub type CancelNotification = NotificationMessage<CancelParams>;Expand description
The base protocol offers support for request cancellation.
A request A request that got canceled still needs to return from the server and send a response back.
It can not be left open / hanging. This is in line with the JSON-RPC protocol
that requires that every request sends a response back. In addition it allows for
returning partial results on cancel. If the request returns an error response on cancellation it is
advised to set the error code to ErrorCodes.RequestCancelled.
To cancel a request, a notification message with the following properties is sent:
§Notification
method: ‘$/cancelRequest’params: CancelParams
Aliased Type§
pub struct CancelNotification {
pub jsonrpc: String,
pub method: String,
pub params: Option<CancelParams>,
}Fields§
§jsonrpc: Stringjsonrpc version. LSP uses 2.0
method: StringThe method to be invoked.
params: Option<CancelParams>The notification’s params