pub struct Diagnostic {
pub range: (usize, usize),
pub severity: DiagnosticSeverity,
pub code: Option<String>,
pub message: String,
pub related_information: Vec<RelatedInformation>,
pub tags: Vec<DiagnosticTag>,
pub suggestion: Option<String>,
}Expand description
A diagnostic message.
Represents an issue found during code analysis with location, severity, and additional context information.
Fields§
§range: (usize, usize)Source code range (start, end) where the issue occurs.
severity: DiagnosticSeveritySeverity level of the diagnostic.
code: Option<String>Optional diagnostic code for categorization.
message: StringHuman-readable description of the issue.
Additional context and related information.
Tags for categorizing the diagnostic.
suggestion: Option<String>Optional short suggestion for how to fix the issue.
This is a concise, actionable fix description separate from the related information. IDEs can surface this as a quick-fix hint.
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl Eq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.