#[non_exhaustive]pub struct RuleReport {
pub spec: RuleSpec,
pub layer: String,
pub other: Option<String>,
pub counts: BTreeMap<ViolationKind, usize>,
pub violations: Vec<Violation>,
}Expand description
One rule’s violations, with deterministic counts and feature provenance.
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.spec: RuleSpecRegistered rule with its topology-scoped rule and layer IDs.
layer: StringPrimary input layer name.
other: Option<String>Secondary input layer name for a binary rule.
counts: BTreeMap<ViolationKind, usize>Number of aggregated violations per kind, in kind order.
violations: Vec<Violation>Deterministically ordered violations, serialized as errors.
Several parts may contribute to one violation.
Implementations§
Source§impl RuleReport
impl RuleReport
Sourcepub fn layer_name(&self, id: LayerId) -> Option<&str>
pub fn layer_name(&self, id: LayerId) -> Option<&str>
Return the name of one of this rule’s input layers, as referenced by its violations.
Trait Implementations§
Source§impl Clone for RuleReport
impl Clone for RuleReport
Source§fn clone(&self) -> RuleReport
fn clone(&self) -> RuleReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RuleReport
impl Debug for RuleReport
Auto Trait Implementations§
impl Freeze for RuleReport
impl RefUnwindSafe for RuleReport
impl Send for RuleReport
impl Sync for RuleReport
impl Unpin for RuleReport
impl UnsafeUnpin for RuleReport
impl UnwindSafe for RuleReport
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> 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