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§
sourcefn to_lsp_diagnostic(&self, text: &str) -> Diagnostic
fn to_lsp_diagnostic(&self, text: &str) -> Diagnostic
Convert the traited object to a [lsp_types::Diagnostic].
sourcefn severity(&self) -> DiagnosticSeverity
fn severity(&self) -> DiagnosticSeverity
Get the severity of the diagnostic.