pub struct GenericDiagnosticsEngine { /* private fields */ }Expand description
Generic diagnostics engine that delegates to pluggable providers
Implementations§
Source§impl GenericDiagnosticsEngine
impl GenericDiagnosticsEngine
Sourcepub fn register_provider(&mut self, provider: Box<dyn DiagnosticsProvider>)
pub fn register_provider(&mut self, provider: Box<dyn DiagnosticsProvider>)
Register a diagnostics provider
Sourcepub fn registry(&self) -> &DiagnosticsRegistry
pub fn registry(&self) -> &DiagnosticsRegistry
Get the provider registry
Sourcepub fn registry_mut(&mut self) -> &mut DiagnosticsRegistry
pub fn registry_mut(&mut self) -> &mut DiagnosticsRegistry
Get a mutable reference to the provider registry
Sourcepub fn generate_diagnostics(
&self,
code: &str,
language: &str,
) -> ProviderResult<Vec<Diagnostic>>
pub fn generate_diagnostics( &self, code: &str, language: &str, ) -> ProviderResult<Vec<Diagnostic>>
Generate diagnostics using the appropriate provider or fallback
Sourcepub fn generate_diagnostics_for_range(
&self,
code: &str,
language: &str,
range: Range,
) -> ProviderResult<Vec<Diagnostic>>
pub fn generate_diagnostics_for_range( &self, code: &str, language: &str, range: Range, ) -> ProviderResult<Vec<Diagnostic>>
Generate diagnostics for a specific range
Sourcepub fn has_provider(&self, language: &str) -> bool
pub fn has_provider(&self, language: &str) -> bool
Check if a provider is registered for a language
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GenericDiagnosticsEngine
impl !RefUnwindSafe for GenericDiagnosticsEngine
impl Send for GenericDiagnosticsEngine
impl Sync for GenericDiagnosticsEngine
impl Unpin for GenericDiagnosticsEngine
impl !UnwindSafe for GenericDiagnosticsEngine
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