Skip to main content

LocalCodeIntelligenceProvider

Trait LocalCodeIntelligenceProvider 

Source
pub trait LocalCodeIntelligenceProvider: Send + Sync {
    // Required methods
    fn provider_name(&self) -> &'static str;
    fn probe<'life0, 'async_trait>(
        &'life0 self,
        request: ProviderRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderCapability, ProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn resolve_symbols<'life0, 'async_trait>(
        &'life0 self,
        input: ResolveSymbolsRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ResolveSymbolsResult, ProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_local_neighbors<'life0, 'async_trait>(
        &'life0 self,
        input: LocalNeighborsRequest,
    ) -> Pin<Box<dyn Future<Output = Result<LocalNeighborResult, ProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_local_impact<'life0, 'async_trait>(
        &'life0 self,
        input: LocalImpactRequest,
    ) -> Pin<Box<dyn Future<Output = Result<LocalImpactResult, ProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn build_local_context<'life0, 'async_trait>(
        &'life0 self,
        input: LocalContextRequest,
    ) -> Pin<Box<dyn Future<Output = Result<LocalContextResult, ProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_affected_tests<'life0, 'async_trait>(
        &'life0 self,
        input: AffectedTestsRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Option<AffectedTestsResult>, ProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn shutdown<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), ProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Optional boundary for repository-local code intelligence.

Required Methods§

Source

fn provider_name(&self) -> &'static str

Returns the stable provider name.

Source

fn probe<'life0, 'async_trait>( &'life0 self, request: ProviderRequest, ) -> Pin<Box<dyn Future<Output = Result<ProviderCapability, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Discovers public capabilities for one repository without creating or modifying indexes.

§Errors

Returns ProviderError for cancellation, timeout, invalid output, or transport failure.

Source

fn resolve_symbols<'life0, 'async_trait>( &'life0 self, input: ResolveSymbolsRequest, ) -> Pin<Box<dyn Future<Output = Result<ResolveSymbolsResult, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Resolves a textual anchor to bounded exact local symbols.

§Errors

Returns ProviderError when no compatible public contract can complete the request.

Source

fn get_local_neighbors<'life0, 'async_trait>( &'life0 self, input: LocalNeighborsRequest, ) -> Pin<Box<dyn Future<Output = Result<LocalNeighborResult, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns bounded callers or callees for one local symbol.

§Errors

Returns ProviderError when no compatible public contract can complete the request.

Source

fn get_local_impact<'life0, 'async_trait>( &'life0 self, input: LocalImpactRequest, ) -> Pin<Box<dyn Future<Output = Result<LocalImpactResult, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns bounded local impact for one symbol.

§Errors

Returns ProviderError when no compatible public contract can complete the request.

Source

fn build_local_context<'life0, 'async_trait>( &'life0 self, input: LocalContextRequest, ) -> Pin<Box<dyn Future<Output = Result<LocalContextResult, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Builds ephemeral local source and flow context.

§Errors

Returns ProviderError when no compatible public contract can complete the request.

Source

fn get_affected_tests<'life0, 'async_trait>( &'life0 self, input: AffectedTestsRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<AffectedTestsResult>, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns bounded tests affected by changed files when supported.

Ok(None) means the optional capability is unavailable.

§Errors

Returns ProviderError when a declared compatible contract fails.

Source

fn shutdown<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Releases provider resources and terminates owned child processes.

§Errors

Returns ProviderError if orderly shutdown fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§