pub trait QueryEngine: Send + Sync {
// Required methods
fn go_to_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn find_references<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn go_to_implementation<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn go_to_type_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn hover<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn document_symbols<'life0, 'async_trait>(
&'life0 self,
file: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<Vec<SymbolInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn workspace_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<SymbolInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn query<'life0, 'async_trait>(
&'life0 self,
query_type: QueryType,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
查询引擎 trait
提供代码符号查询能力。
Required Methods§
Sourcefn go_to_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn go_to_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
查询符号定义
Sourcefn find_references<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn find_references<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
查询符号引用
Sourcefn go_to_implementation<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn go_to_implementation<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
查询接口实现
Sourcefn go_to_type_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn go_to_type_definition<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
查询类型定义
Sourcefn hover<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn hover<'life0, 'async_trait>(
&'life0 self,
location: CodeLocation,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取悬停信息
Sourcefn document_symbols<'life0, 'async_trait>(
&'life0 self,
file: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<Vec<SymbolInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn document_symbols<'life0, 'async_trait>(
&'life0 self,
file: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<Vec<SymbolInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
列出文档符号
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".