#[non_exhaustive]pub struct Violation {
pub rule_id: &'static str,
pub severity: Severity,
pub message: String,
pub fixable: bool,
pub entity_id: Option<String>,
pub edge_id: Option<String>,
}Expand description
A single rule violation produced by a rule implementation (ADR-034 §5).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rule_id: &'static strThe rule that produced this violation.
severity: SeverityViolation severity (may differ from rule-level severity for pack rules that emit mixed-severity output within one rule).
message: StringHuman-readable explanation of the violation.
fixable: boolWhether the violation can be fixed by kkernel kg validate --fix.
entity_id: Option<String>Optional entity UUID (short-form) that the violation targets.
edge_id: Option<String>Optional edge UUID (short-form) that the violation targets.
Implementations§
Auto Trait Implementations§
impl Freeze for Violation
impl RefUnwindSafe for Violation
impl Send for Violation
impl Sync for Violation
impl Unpin for Violation
impl UnsafeUnpin for Violation
impl UnwindSafe for Violation
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