Trait kcl_lib::lsp::util::IntoDiagnostic

source ·
pub trait IntoDiagnostic {
    // Required methods
    fn to_lsp_diagnostic(&self, text: &str) -> Diagnostic;
    fn severity(&self) -> DiagnosticSeverity;
}
Expand description

Convert an object into a [lsp_types::Diagnostic] given the [TextDocumentItem]’s .text field.

Required Methods§

source

fn to_lsp_diagnostic(&self, text: &str) -> Diagnostic

Convert the traited object to a [lsp_types::Diagnostic].

source

fn severity(&self) -> DiagnosticSeverity

Get the severity of the diagnostic.

Implementors§