pub trait WorkspaceCodeIntelligence: Send + Sync {
// Required methods
fn subscribe_status(&self) -> Receiver<CodeIntelligenceStatus>;
fn document_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 WorkspacePath,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<DocumentSymbol>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn search_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<SymbolInformation>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn navigate<'life0, 'life1, 'async_trait>(
&'life0 self,
kind: NavigationKind,
path: &'life1 WorkspacePath,
position: CodePosition,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<CodeLocation>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn diagnostics<'life0, 'life1, 'async_trait>(
&'life0 self,
path: Option<&'life1 WorkspacePath>,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<CodeDiagnostic>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn status(&self) -> CodeIntelligenceStatus { ... }
}Expand description
Workspace-scoped provider for read-only semantic code queries.
Implementations operate on saved documents. Unsaved editor buffers are intentionally outside this contract so independent views cannot overwrite one another’s semantic state.
Required Methods§
Sourcefn subscribe_status(&self) -> Receiver<CodeIntelligenceStatus>
fn subscribe_status(&self) -> Receiver<CodeIntelligenceStatus>
Subscribe to runtime lifecycle and capability changes.
Sourcefn document_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 WorkspacePath,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<DocumentSymbol>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn document_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 WorkspacePath,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<DocumentSymbol>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the hierarchical symbol outline for a saved document.
Sourcefn search_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<SymbolInformation>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_symbols<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<SymbolInformation>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search symbols across the workspace, bounded by limit.
Resolve one semantic navigation operation from a saved document.
Sourcefn diagnostics<'life0, 'life1, 'async_trait>(
&'life0 self,
path: Option<&'life1 WorkspacePath>,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<CodeDiagnostic>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn diagnostics<'life0, 'life1, 'async_trait>(
&'life0 self,
path: Option<&'life1 WorkspacePath>,
cancellation: CancellationToken,
) -> Pin<Box<dyn Future<Output = CodeIntelligenceResult<CodeQueryResult<CodeDiagnostic>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Pull diagnostics for one saved document, or for the workspace when
path is None.
Provided Methods§
Sourcefn status(&self) -> CodeIntelligenceStatus
fn status(&self) -> CodeIntelligenceStatus
Return the latest status snapshot without waiting for a state change.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".