pub struct Violation {Show 13 fields
pub rule: RuleKind,
pub rule_id: String,
pub reason: String,
pub message: String,
pub file: String,
pub line: Option<i64>,
pub from: Option<Endpoint>,
pub to: Option<Endpoint>,
pub subject: Option<Endpoint>,
pub metric: Option<Metric>,
pub scope: Option<Scope>,
pub value: Option<i64>,
pub max: Option<i64>,
}Expand description
One rule violation.
Dependency violations (forbidden, allowed_dependents,
no_new_dependents) carry from/to endpoints; limit violations carry
a subject endpoint plus the metric fields.
Fields§
§rule: RuleKind§rule_id: StringStable identifier of the specific rule instance, used for grouping
(e.g. forbidden: domain -> infrastructure).
reason: String§message: StringOne-line human description of the violating dependency or metric.
file: StringPrimary file (from side for dependency rules, subject file for limits).
line: Option<i64>§from: Option<Endpoint>§to: Option<Endpoint>§subject: Option<Endpoint>§metric: Option<Metric>§scope: Option<Scope>§value: Option<i64>§max: Option<i64>Trait 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§
impl<T> Allocation for T
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