pub struct Cognitive {
pub sum: u64,
pub value: u64,
pub average: f64,
pub min: u64,
pub max: u64,
}Expand description
Wire form of the Cognitive metric.
Fields§
§sum: u64Cognitive-complexity sum across the space.
value: u64This space’s own cognitive complexity, excluding nested
function/closure spaces. Equals sum only at a leaf
space; at an interior space the sum rolls up descendants while
this stays the per-space scalar the CLI thresholds against
(#958). #[serde(default)] so pre-#958 JSON (which lacks the
field) still deserializes — e.g. when bca diff reads an older
metrics file.
average: f64Average cognitive complexity per function.
min: u64Minimum cognitive complexity in a single function.
max: u64Maximum cognitive complexity in a single function.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cognitive
impl<'de> Deserialize<'de> for Cognitive
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Cognitive
Auto Trait Implementations§
impl Freeze for Cognitive
impl RefUnwindSafe for Cognitive
impl Send for Cognitive
impl Sync for Cognitive
impl Unpin for Cognitive
impl UnsafeUnpin for Cognitive
impl UnwindSafe for Cognitive
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