dls.protocol.handlers

Undocumented in source.

Public Imports

std.typecons
public import std.typecons;
Undocumented in source.

Members

Aliases

NotificationHandler
alias NotificationHandler = void delegate(Nullable!JSONValue)
Undocumented in source.
RequestHandler
alias RequestHandler = Nullable!JSONValue delegate(Nullable!JSONValue)
Undocumented in source.
ResponseHandler
alias ResponseHandler = void delegate(string id, Nullable!JSONValue)
Undocumented in source.

Classes

HandlerNotFoundException
class HandlerNotFoundException
Undocumented in source.

Functions

handler
auto handler(string methodOrId)

Returns the RequestHandler/NotificationHandler/ResponseHandler corresponding to a specific LSP method.

hasRegisteredHandler
bool hasRegisteredHandler(string method)

Checks if a method has a handler registered for it. Used to determine if the server should send a request or a notification to the client (if the method has a handler, then the server will expect a response and thus send a request).

pushHandler
void pushHandler(string method, F func)

Registers a new handler of any kind (RequestHandler, NotificationHandler or ResponseHandler).

pushHandler
void pushHandler(string id, string method)

Registers a new dynamic ResponseHandler (used at runtime)

Imports

JSONValue (from std.json)
public import std.json : JSONValue;
Undocumented in source.

Templates

isHandler
template isHandler(func...)

Checks if a function is correct handler function. These will only be registered at startup time and will never be unregistered.

Meta