Struct ComplexityEntity
pub struct ComplexityEntity {Show 21 fields
pub path: String,
pub name: String,
pub kind: String,
pub start_line: u32,
pub end_line: u32,
pub cyclomatic: f64,
pub cognitive: f64,
pub halstead_volume: Option<f64>,
pub halstead_difficulty: Option<f64>,
pub halstead_effort: Option<f64>,
pub mi: Option<f64>,
pub nom: u32,
pub nexits: u32,
pub nargs: u32,
pub loc: u32,
pub sloc: u32,
pub max_nesting: u32,
pub mean_nesting: f64,
pub sd_nesting: f64,
pub total_nesting: u32,
pub bool_ops: u32,
}Expand description
One function (or class, or file-level unit) with its complexity metrics.
Fields§
§path: String§name: String§kind: String§start_line: u32§end_line: u32§cyclomatic: f64§cognitive: f64§halstead_volume: Option<f64>§halstead_difficulty: Option<f64>§halstead_effort: Option<f64>§mi: Option<f64>§nom: u32§nexits: u32§nargs: u32Number of arguments of this function/closure (0 for non-callable spaces).
loc: u32§sloc: u32§max_nesting: u32Deepest control-flow nesting reached in this space (three nested ifs
yield 3; 0 when the space has no branching/looping construct).
mean_nesting: f64Per-construct nesting distribution is not retained by codelore-rca, so mean/sd nesting are left at 0.0 (honest-absence).
sd_nesting: f64§total_nesting: u32Sum of the nesting depth of every branching/looping construct.
bool_ops: u32Count of boolean-operator sequences in conditions (a && b || c is 2;
a && b && c is 1) — the complex-conditional driver.
Trait Implementations§
§impl Clone for ComplexityEntity
impl Clone for ComplexityEntity
§fn clone(&self) -> ComplexityEntity
fn clone(&self) -> ComplexityEntity
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 moreAuto Trait Implementations§
impl Freeze for ComplexityEntity
impl RefUnwindSafe for ComplexityEntity
impl Send for ComplexityEntity
impl Sync for ComplexityEntity
impl Unpin for ComplexityEntity
impl UnsafeUnpin for ComplexityEntity
impl UnwindSafe for ComplexityEntity
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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