pub struct FunctionReport {
pub name: String,
pub kind: String,
pub line: u32,
pub cognitive: u32,
pub cyclomatic: u32,
pub children: Vec<FunctionReport>,
}Expand description
Complexity metrics for a single function-like unit (function, method, arrow, accessor).
Each unit is measured independently: nesting resets to 0 at the function
boundary and nested functions are reported as children rather than being
folded into the parent’s own score. See crate::engine for the exact rules.
Fields§
§name: String§kind: String“function” | “method” | “arrow” | “getter” | “setter” | “constructor”
line: u321-based line where the function starts.
cognitive: u32§cyclomatic: u32§children: Vec<FunctionReport>Trait Implementations§
Source§impl Clone for FunctionReport
impl Clone for FunctionReport
Source§fn clone(&self) -> FunctionReport
fn clone(&self) -> FunctionReport
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 FunctionReport
impl Debug for FunctionReport
Auto Trait Implementations§
impl Freeze for FunctionReport
impl RefUnwindSafe for FunctionReport
impl Send for FunctionReport
impl Sync for FunctionReport
impl Unpin for FunctionReport
impl UnsafeUnpin for FunctionReport
impl UnwindSafe for FunctionReport
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