pub struct ProviderChainManager { /* private fields */ }Expand description
Provider chain manager that orchestrates the provider priority chain
Implementations§
Source§impl ProviderChainManager
impl ProviderChainManager
Sourcepub fn new(registry: ProviderRegistry) -> Self
pub fn new(registry: ProviderRegistry) -> Self
Create a new provider chain manager
Sourcepub async fn get_completions(
&self,
params: &CompletionParams,
) -> IdeResult<Vec<CompletionItem>>
pub async fn get_completions( &self, params: &CompletionParams, ) -> IdeResult<Vec<CompletionItem>>
Get completions through the provider chain
Sourcepub async fn get_diagnostics(
&self,
params: &DiagnosticsParams,
) -> IdeResult<Vec<Diagnostic>>
pub async fn get_diagnostics( &self, params: &DiagnosticsParams, ) -> IdeResult<Vec<Diagnostic>>
Get diagnostics through the provider chain
Sourcepub async fn get_hover(&self, params: &HoverParams) -> IdeResult<Option<Hover>>
pub async fn get_hover(&self, params: &HoverParams) -> IdeResult<Option<Hover>>
Get hover information through the provider chain
Sourcepub async fn get_definition(
&self,
params: &DefinitionParams,
) -> IdeResult<Option<Location>>
pub async fn get_definition( &self, params: &DefinitionParams, ) -> IdeResult<Option<Location>>
Get definition location through the provider chain
Sourcepub async fn on_provider_availability_changed(
&self,
callback: Box<dyn Fn(ProviderChange) + Send + Sync>,
)
pub async fn on_provider_availability_changed( &self, callback: Box<dyn Fn(ProviderChange) + Send + Sync>, )
Register a provider availability change callback
Sourcepub async fn notify_provider_change(&self, change: ProviderChange)
pub async fn notify_provider_change(&self, change: ProviderChange)
Notify all callbacks of a provider availability change
Sourcepub async fn reload_configuration(&self) -> IdeResult<()>
pub async fn reload_configuration(&self) -> IdeResult<()>
Reload configuration without restart
Sourcepub async fn update_config(&self, config: IdeIntegrationConfig) -> IdeResult<()>
pub async fn update_config(&self, config: IdeIntegrationConfig) -> IdeResult<()>
Update configuration and refresh providers
Sourcepub async fn registry(&self) -> RwLockReadGuard<'_, ProviderRegistry>
pub async fn registry(&self) -> RwLockReadGuard<'_, ProviderRegistry>
Get the provider registry
Sourcepub async fn registry_mut(&self) -> RwLockWriteGuard<'_, ProviderRegistry>
pub async fn registry_mut(&self) -> RwLockWriteGuard<'_, ProviderRegistry>
Get mutable access to the provider registry
Sourcepub async fn is_provider_available(&self, language: &str) -> bool
pub async fn is_provider_available(&self, language: &str) -> bool
Check if a provider is available for a language
Sourcepub async fn available_languages(&self) -> Vec<String>
pub async fn available_languages(&self) -> Vec<String>
Get all available languages
Auto Trait Implementations§
impl Freeze for ProviderChainManager
impl !RefUnwindSafe for ProviderChainManager
impl Send for ProviderChainManager
impl Sync for ProviderChainManager
impl Unpin for ProviderChainManager
impl !UnwindSafe for ProviderChainManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more