[][src]Struct tamasfe_lsp_types::Diagnostic

pub struct Diagnostic {
    pub range: Range,
    pub severity: Option<DiagnosticSeverity>,
    pub code: Option<NumberOrString>,
    pub source: Option<String>,
    pub message: String,
    pub related_information: Option<Vec<DiagnosticRelatedInformation>>,
    pub tags: Option<Vec<DiagnosticTag>>,
}

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<NumberOrString>

The diagnostic's code. Can be omitted.

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.

related_information: Option<Vec<DiagnosticRelatedInformation>>

An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

tags: Option<Vec<DiagnosticTag>>

Additional metadata about the diagnostic.

Implementations

impl Diagnostic[src]

pub fn new(
    range: Range,
    severity: Option<DiagnosticSeverity>,
    code: Option<NumberOrString>,
    source: Option<String>,
    message: String,
    related_information: Option<Vec<DiagnosticRelatedInformation>>,
    tags: Option<Vec<DiagnosticTag>>
) -> Diagnostic
[src]

pub fn new_simple(range: Range, message: String) -> Diagnostic[src]

pub fn new_with_code_number(
    range: Range,
    severity: DiagnosticSeverity,
    code_number: i32,
    source: Option<String>,
    message: String
) -> Diagnostic
[src]

Trait Implementations

impl Clone for Diagnostic[src]

impl Debug for Diagnostic[src]

impl Default for Diagnostic[src]

impl<'de> Deserialize<'de> for Diagnostic[src]

impl Eq for Diagnostic[src]

impl PartialEq<Diagnostic> for Diagnostic[src]

impl Serialize for Diagnostic[src]

impl StructuralEq for Diagnostic[src]

impl StructuralPartialEq for Diagnostic[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.