pub struct LintViolation {
pub rule_code: &'static str,
pub message: String,
pub span: Span,
pub severity: Severity,
pub fixes: Vec<SourceEdit>,
}Expand description
A single lint violation found by a rule.
Fields§
§rule_code: &'static strRule code, e.g. “CP01”.
message: StringHuman-readable message describing the violation.
span: SpanLocation in source.
severity: SeveritySeverity level.
fixes: Vec<SourceEdit>Suggested fixes (empty if not auto-fixable).
Implementations§
Trait Implementations§
Source§impl Clone for LintViolation
impl Clone for LintViolation
Source§fn clone(&self) -> LintViolation
fn clone(&self) -> LintViolation
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 LintViolation
impl RefUnwindSafe for LintViolation
impl Send for LintViolation
impl Sync for LintViolation
impl Unpin for LintViolation
impl UnsafeUnpin for LintViolation
impl UnwindSafe for LintViolation
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