pub trait RelationsStore: Send + Sync {
// Required methods
fn store_definitions<'life0, 'life1, 'async_trait>(
&'life0 self,
definitions: Vec<Definition>,
root_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn store_references<'life0, 'life1, 'async_trait>(
&'life0 self,
references: Vec<Reference>,
root_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_definition_at<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 str,
line: usize,
column: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<Definition>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_definitions_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Definition>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_references<'life0, 'life1, 'async_trait>(
&'life0 self,
target_symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reference>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_callers<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CallEdge>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_callees<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CallEdge>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_by_file<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RelationsStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for storing and querying code relationships.
Required Methods§
Sourcefn store_definitions<'life0, 'life1, 'async_trait>(
&'life0 self,
definitions: Vec<Definition>,
root_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_definitions<'life0, 'life1, 'async_trait>(
&'life0 self,
definitions: Vec<Definition>,
root_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store definitions for a file
Sourcefn store_references<'life0, 'life1, 'async_trait>(
&'life0 self,
references: Vec<Reference>,
root_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_references<'life0, 'life1, 'async_trait>(
&'life0 self,
references: Vec<Reference>,
root_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store references for a file
Sourcefn find_definition_at<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 str,
line: usize,
column: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<Definition>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_definition_at<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 str,
line: usize,
column: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<Definition>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find definition at a specific location
Sourcefn find_definitions_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Definition>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_definitions_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Definition>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find all definitions with a given name
Sourcefn find_references<'life0, 'life1, 'async_trait>(
&'life0 self,
target_symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reference>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_references<'life0, 'life1, 'async_trait>(
&'life0 self,
target_symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reference>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find all references to a symbol
Sourcefn get_callers<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CallEdge>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_callers<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CallEdge>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get callers of a function (incoming call edges)
Sourcefn get_callees<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CallEdge>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_callees<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CallEdge>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get callees of a function (outgoing call edges)
Sourcefn delete_by_file<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_by_file<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete all relationships for a file (for incremental updates)