struct LSP::Message::Cancel

Overview

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.

Included Modules

Defined in:

lsp/message.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(params : LSP::Message::Cancel::Params = Params.new) #

[View source]

Class Method Detail

def self.method #

[View source]

Instance Method Detail

def jsonrpc : String #

def jsonrpc=(jsonrpc : String) #

def method : String #

def method=(method : String) #

def params : Params #

def params=(params : Params) #