pub struct BranchingCognitive {
pub previous: u32,
pub current: u32,
pub delta: i64,
pub nesting_weight_delta: i64,
pub attributed_to: Option<CognitiveAttribution>,
}Expand description
The cognitive figure and what drove it.
previous and current exclude prop-count and hook-density increments.
Both are cognitive-only, and prop count records an excess over a floor, so
it is superlinear in a split and would move this number with branching and
nesting both flat. This therefore does not match the cognitive score the
complexity findings report.
Fields§
§previous: u32Cognitive weight on the base revision.
current: u32Cognitive weight on the head revision.
delta: i64current - previous.
nesting_weight_delta: i64Change in the summed nesting depth behind those increments.
attributed_to: Option<CognitiveAttribution>What the improvement is attributable to, absent when cognitive did not fall. There is nothing to attribute when the number rose or held.
Trait Implementations§
Source§impl Clone for BranchingCognitive
impl Clone for BranchingCognitive
impl Copy for BranchingCognitive
Source§impl Debug for BranchingCognitive
impl Debug for BranchingCognitive
impl Eq for BranchingCognitive
Source§impl PartialEq for BranchingCognitive
impl PartialEq for BranchingCognitive
Source§impl Serialize for BranchingCognitive
impl Serialize for BranchingCognitive
impl StructuralPartialEq for BranchingCognitive
Auto Trait Implementations§
impl Freeze for BranchingCognitive
impl RefUnwindSafe for BranchingCognitive
impl Send for BranchingCognitive
impl Sync for BranchingCognitive
impl Unpin for BranchingCognitive
impl UnsafeUnpin for BranchingCognitive
impl UnwindSafe for BranchingCognitive
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.