pub trait QueryEngine: Send + Sync {
// Required methods
fn go_to_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<QueryResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_references<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn go_to_implementation<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn go_to_type_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<QueryResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn hover<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn document_symbols<'life0, 'async_trait>(
&'life0 self,
file: PathBuf,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn workspace_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query<'life0, 'async_trait>(
&'life0 self,
query_type: QueryType,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
查询引擎 trait
提供代码符号查询能力。
Required Methods§
Sourcefn go_to_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn go_to_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
查询符号定义
Sourcefn find_references<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_references<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
查询符号引用
Sourcefn go_to_implementation<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn go_to_implementation<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
查询接口实现
Sourcefn go_to_type_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn go_to_type_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
查询类型定义
Sourcefn hover<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn hover<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取悬停信息
Sourcefn document_symbols<'life0, 'async_trait>(
&'life0 self,
file: PathBuf,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn document_symbols<'life0, 'async_trait>(
&'life0 self,
file: PathBuf,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
列出文档符号
Sourcefn workspace_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn workspace_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<SymbolInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
工作区符号搜索
Sourcefn query<'life0, 'async_trait>(
&'life0 self,
query_type: QueryType,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
query_type: QueryType,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<QueryResult>>> + 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".