pub struct ComplexityClass {
pub introduced: bool,
pub worsened_metrics: Vec<WorsenedMetric>,
pub exceeded_metric_grew: bool,
}Expand description
Attribution of one head complexity finding against the base findings.
Fields§
§introduced: booltrue when no base finding matches, when a newly exceeded metric
grew, or when growth moved the finding to a higher severity tier.
worsened_metrics: Vec<WorsenedMetric>The measured metrics that are higher than in the matched base finding. Empty when no base finding matches or when no metric grew.
exceeded_metric_grew: booltrue when a metric that the finding exceeds grew. Before this rule,
that growth made the finding introduced, so audit.worsened: off
keeps it worsened (see Self::clear_worsened_for_off).
Implementations§
Source§impl ComplexityClass
impl ComplexityClass
Sourcepub fn is_worsened(&self) -> bool
pub fn is_worsened(&self) -> bool
true when a base finding matches, the finding is not introduced, and
a measured metric grew.
Sourcepub fn attribution(&self) -> AuditFindingAttribution
pub fn attribution(&self) -> AuditFindingAttribution
The audit-mode class of the finding.
Sourcepub fn clear_worsened_for_off(&mut self)
pub fn clear_worsened_for_off(&mut self)
Clear the grown metrics for audit.worsened: off. Growth only in
metrics that the finding does not exceed then stays inherited. Growth
of an exceeded metric stays worsened, so it gives at least warn and
does not disappear from the report.
Trait Implementations§
Source§impl Clone for ComplexityClass
impl Clone for ComplexityClass
Source§impl Debug for ComplexityClass
impl Debug for ComplexityClass
Source§impl Default for ComplexityClass
impl Default for ComplexityClass
Source§impl PartialEq for ComplexityClass
impl PartialEq for ComplexityClass
impl StructuralPartialEq for ComplexityClass
Auto Trait Implementations§
impl Freeze for ComplexityClass
impl RefUnwindSafe for ComplexityClass
impl Send for ComplexityClass
impl Sync for ComplexityClass
impl Unpin for ComplexityClass
impl UnsafeUnpin for ComplexityClass
impl UnwindSafe for ComplexityClass
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
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> ⓘ
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> ⓘ
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