[][src]Struct 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>>,
}

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.

Methods

impl Diagnostic
[src]

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

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

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

Trait Implementations

impl Eq for Diagnostic
[src]

impl Default for Diagnostic
[src]

impl PartialEq<Diagnostic> for Diagnostic
[src]

impl Clone for Diagnostic
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Diagnostic
[src]

impl Serialize for Diagnostic
[src]

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

Auto Trait Implementations

impl Send for Diagnostic

impl Sync for Diagnostic

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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