sync_ls

Trait LsHook

Source
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§

Source

fn start_request(&self, req_id: &RequestId, method: &str)

Starts a request.

Source

fn stop_request(&self, req_id: &RequestId, method: &str, received_at: Instant)

Stops a request.

Source

fn start_notification(&self, method: &str)

Starts a notification.

Source

fn stop_notification( &self, method: &str, received_at: Instant, result: LspResult<()>, )

Stops a notification.

Implementations on Foreign Types§

Source§

impl LsHook for ()

Source§

fn start_request(&self, req_id: &RequestId, method: &str)

Source§

fn stop_request(&self, req_id: &RequestId, method: &str, received_at: Instant)

Source§

fn start_notification(&self, method: &str)

Source§

fn stop_notification( &self, method: &str, received_at: Instant, result: LspResult<()>, )

Implementors§