pub struct RuleViolation {
pub rule_id: String,
pub category: RuleCategory,
pub severity: Severity,
pub file_path: Option<String>,
pub title: String,
pub attribution: String,
pub suggestion: Option<String>,
}Expand description
A violation produced when a rule detects an issue.
Fields§
§rule_id: StringUnique rule ID that produced this violation (e.g. “freshness/stale-doc”).
category: RuleCategoryCategory the rule belongs to.
severity: SeveritySeverity of this violation.
file_path: Option<String>File that triggered the violation, if applicable.
title: StringHuman-readable title.
attribution: StringWhy this matters for AI tools (attribution message).
suggestion: Option<String>Actionable suggestion to fix the issue.
Trait Implementations§
Source§impl Clone for RuleViolation
impl Clone for RuleViolation
Source§fn clone(&self) -> RuleViolation
fn clone(&self) -> RuleViolation
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 RuleViolation
impl Debug for RuleViolation
Auto Trait Implementations§
impl Freeze for RuleViolation
impl RefUnwindSafe for RuleViolation
impl Send for RuleViolation
impl Sync for RuleViolation
impl Unpin for RuleViolation
impl UnsafeUnpin for RuleViolation
impl UnwindSafe for RuleViolation
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more