Struct lsp::types::Diagnostic [−][src]
pub struct Diagnostic { pub range: Range, pub severity: Option<DiagnosticSeverity>, pub code: Option<Union<i32, String>>, pub source: Option<String>, pub message: String, pub related_information: Option<Vec<DiagnosticRelatedInformation>>, }
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.
Fields
range: Range
The range at which the message applies
severity: Option<DiagnosticSeverity>
The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.
code: Option<Union<i32, String>>
The diagnostic's code, which might appear in the user interface.
source: Option<String>
A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.
message: String
The diagnostic's message.
An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.
Methods
impl Diagnostic
[src]
impl Diagnostic
The Diagnostic namespace provides helper functions to work with Diagnostic literals.
pub fn create(
range: Range,
message: String,
severity: Option<DiagnosticSeverity>,
code: Option<Union<i32, String>>,
source: Option<String>,
related_information: Option<Vec<DiagnosticRelatedInformation>>
) -> Self
[src]
pub fn create(
range: Range,
message: String,
severity: Option<DiagnosticSeverity>,
code: Option<Union<i32, String>>,
source: Option<String>,
related_information: Option<Vec<DiagnosticRelatedInformation>>
) -> Self
Creates a new Diagnostic literal.
Trait Implementations
impl Debug for Diagnostic
[src]
impl Debug for Diagnostic
Auto Trait Implementations
impl Send for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Sync for Diagnostic