struct

LSP::Message::Cancel

Inherits JSON::Serializable < Struct < Value < Object

The base protocol offers support for request cancellation.

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 requests returns an error response on cancellation it is advised to set the error code to ErrorCodes.RequestCancelled.

Notification and requests whose methods start with ‘$/’ are messages which are protocol implementation dependent and might not be implementable in all clients or servers. For example if the server implementation uses a single threaded synchronous programming language then there is little a server can do to react to a ‘$/cancelRequest’. If a server or client receives notifications or requests starting with ‘$/’ it is free to ignore them if they are unknown.

Constructors

new(pull : JSON::PullParser)
new(params : LSP::Message::Cancel::Params = Params.new)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)

Class methods

method
Source

Instance methods

jsonrpc
jsonrpc=(jsonrpc : String)
method
method=(method : String)
params
params=(params : Params)

Nested types