[−][src]Struct lsp_types::Diagnostic
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.
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]
range: Range,
severity: Option<DiagnosticSeverity>,
code: Option<NumberOrString>,
source: Option<String>,
message: String,
related_information: Option<Vec<DiagnosticRelatedInformation>>
) -> Diagnostic
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]
range: Range,
severity: DiagnosticSeverity,
code_number: u64,
source: Option<String>,
message: String
) -> Diagnostic
Trait Implementations
impl Clone for Diagnostic
[src]
fn clone(&self) -> Diagnostic
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Diagnostic
[src]
fn default() -> Diagnostic
[src]
impl PartialEq<Diagnostic> for Diagnostic
[src]
fn eq(&self, other: &Diagnostic) -> bool
[src]
fn ne(&self, other: &Diagnostic) -> bool
[src]
impl Eq for Diagnostic
[src]
impl Debug for Diagnostic
[src]
impl Serialize for Diagnostic
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Diagnostic
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Diagnostic
impl Unpin for Diagnostic
impl Sync for Diagnostic
impl RefUnwindSafe for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,