Type Alias Diagnostic

Source
pub type Diagnostic = Diagnostic;

Aliased Type§

pub struct Diagnostic {
    pub code: Option<DiagnosticCode>,
    pub location: Option<DiagnosticLocation>,
    pub message: Option<String>,
    pub original_output: Option<String>,
    pub severity: Option<DiagnosticSeverity>,
    pub source: Option<DiagnosticSource>,
    pub suggestions: Option<Vec<DiagnosticItemSuggestions>>,
}

Fields§

§code: Option<DiagnosticCode>

This diagnostic’s rule code. Optional.

§location: Option<DiagnosticLocation>

Location at which this diagnostic message applies.

§message: Option<String>

The diagnostic’s message.

§original_output: Option<String>

Experimental: If this diagnostic is converted from other formats, original_output represents the original output which corresponds to this diagnostic. Optional.

§severity: Option<DiagnosticSeverity>

This diagnostic’s severity. Optional.

§source: Option<DiagnosticSource>

The source of this diagnostic, e.g. ‘typescript’ or ‘super lint’. Optional.

§suggestions: Option<Vec<DiagnosticItemSuggestions>>

Suggested fixes to resolve this diagnostic. Optional.

Implementations§

Source§

impl Diagnostic

Source

pub fn error() -> Self

Source

pub fn warning() -> Self

Source

pub fn info() -> Self

Source

pub fn from_severity(severity: Severity) -> Self

Source

pub fn with_rule(self, rule: Rule) -> Self

Source

pub fn with_location(self, location: Location) -> Self

Source

pub fn with_message(self, message: String) -> Self

Source

pub fn with_code(self, code: Code) -> Self

Source

pub fn with_suggest(self, suggest: String) -> Self