pub struct LspService { /* private fields */ }
Expand description

Service abstraction for the Language Server Protocol.

This service takes an incoming JSON-RPC message as input and produces an outgoing message as output. If the incoming message is a server notification or a client response, then the corresponding response will be None.

This implements tower_service::Service in order to remain independent from the underlying transport and to facilitate further abstraction with middleware.

Pending requests can be canceled by issuing a $/cancelRequest notification.

The service shuts down and stops serving requests after the exit notification is received.

Implementations

Creates a new LspService with the given server backend, also returning a stream of notifications from the server back to the client.

Trait Implementations

Formats the value using the given formatter. Read more

Responses given by the service.

Errors produced by the service.

The future response value.

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more

Process the request and return the response asynchronously. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.