pub struct LintDiagnostic {
pub id: String,
pub message: String,
pub severity: Severity,
pub replacement: String,
pub file: PathBuf,
pub line: usize,
pub end_line: Option<usize>,
pub start_column: Option<usize>,
pub end_column: Option<usize>,
pub word_name: String,
pub start_index: usize,
pub end_index: usize,
}Expand description
A lint diagnostic (match found)
Fields§
§id: StringLint rule ID
message: StringHuman-readable message
severity: SeveritySeverity level
replacement: StringSuggested replacement
file: PathBufFile where the match was found
line: usizeStart line number (0-indexed)
end_line: Option<usize>End line number (0-indexed), for multi-line matches
start_column: Option<usize>Start column (0-indexed), if available from source spans
end_column: Option<usize>End column (0-indexed, exclusive), if available from source spans
word_name: StringWord name where the match was found
start_index: usizeStart index in the word body
end_index: usizeEnd index in the word body (exclusive)
Trait Implementations§
Source§impl Clone for LintDiagnostic
impl Clone for LintDiagnostic
Source§fn clone(&self) -> LintDiagnostic
fn clone(&self) -> LintDiagnostic
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 moreAuto Trait Implementations§
impl Freeze for LintDiagnostic
impl RefUnwindSafe for LintDiagnostic
impl Send for LintDiagnostic
impl Sync for LintDiagnostic
impl Unpin for LintDiagnostic
impl UnwindSafe for LintDiagnostic
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