pub trait LsHook:
Debug
+ Send
+ Sync {
// Required methods
fn start_request(&self, req_id: &RequestId, method: &str);
fn stop_request(
&self,
req_id: &RequestId,
method: &str,
received_at: Instant,
);
fn start_notification(&self, method: &str);
fn stop_notification(
&self,
method: &str,
received_at: Instant,
result: LspResult<()>,
);
}
Expand description
A trait that defines the hook for the language server.
Required Methods§
Sourcefn start_request(&self, req_id: &RequestId, method: &str)
fn start_request(&self, req_id: &RequestId, method: &str)
Starts a request.
Sourcefn stop_request(&self, req_id: &RequestId, method: &str, received_at: Instant)
fn stop_request(&self, req_id: &RequestId, method: &str, received_at: Instant)
Stops a request.
Sourcefn start_notification(&self, method: &str)
fn start_notification(&self, method: &str)
Starts a notification.