pub trait LspRequester: LspClient {
// Required methods
fn request_definition<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<LocationLink>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_references<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
include_declaration: bool,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<LocationLink>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_hover<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<HoverResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_document_symbols<'life0, 'async_trait>(
&'life0 self,
uri: String,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<DocumentSymbol>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_workspace_symbols<'life0, 'async_trait>(
&'life0 self,
query: String,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
LSP 请求 trait
发送 LSP 请求的具体方法。
Required Methods§
Sourcefn request_definition<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<LocationLink>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_definition<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<LocationLink>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
发送定义请求
Sourcefn request_references<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
include_declaration: bool,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<LocationLink>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_references<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
include_declaration: bool,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<LocationLink>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
发送引用请求
Sourcefn request_hover<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<HoverResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_hover<'life0, 'async_trait>(
&'life0 self,
uri: String,
position: Position,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<HoverResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
发送悬停请求
Sourcefn request_document_symbols<'life0, 'async_trait>(
&'life0 self,
uri: String,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<DocumentSymbol>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_document_symbols<'life0, 'async_trait>(
&'life0 self,
uri: String,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<DocumentSymbol>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
发送文档符号请求
Sourcefn request_workspace_symbols<'life0, 'async_trait>(
&'life0 self,
query: String,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_workspace_symbols<'life0, 'async_trait>(
&'life0 self,
query: String,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
发送工作区符号请求
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".