pub struct Stats { /* private fields */ }
Expand description
The Cognitive Complexity
metric.
Implementations§
Source§impl Stats
impl Stats
Sourcepub fn merge(&mut self, other: &Stats)
pub fn merge(&mut self, other: &Stats)
Merges a second Cognitive Complexity
metric into the first one
Sourcepub fn cognitive_sum(&self) -> f64
pub fn cognitive_sum(&self) -> f64
Returns the Cognitive Complexity
sum metric value
Sourcepub fn cognitive_min(&self) -> f64
pub fn cognitive_min(&self) -> f64
Returns the Cognitive Complexity
minimum metric value
Sourcepub fn cognitive_max(&self) -> f64
pub fn cognitive_max(&self) -> f64
Returns the Cognitive Complexity
maximum metric value
Sourcepub fn cognitive_average(&self) -> f64
pub fn cognitive_average(&self) -> f64
Returns the Cognitive Complexity
metric average value
This value is computed dividing the Cognitive Complexity
value
for the total number of functions/closures in a space.
If there are no functions in a code, its value is NAN
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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