pub struct CodeMetrics {
pub lines_of_code: usize,
pub functions: usize,
pub contracts: usize,
pub cyclomatic_complexity: u32,
pub max_nesting_depth: u32,
}Expand description
Code metrics
Fields§
§lines_of_code: usize§functions: usize§contracts: usize§cyclomatic_complexity: u32§max_nesting_depth: u32Implementations§
Source§impl CodeMetrics
impl CodeMetrics
pub fn avg_complexity(&self) -> f64
Trait Implementations§
Source§impl Clone for CodeMetrics
impl Clone for CodeMetrics
Source§fn clone(&self) -> CodeMetrics
fn clone(&self) -> CodeMetrics
Returns a duplicate of the value. Read more
1.0.0 · 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 CodeMetrics
impl Debug for CodeMetrics
Source§impl Default for CodeMetrics
impl Default for CodeMetrics
Source§fn default() -> CodeMetrics
fn default() -> CodeMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodeMetrics
impl RefUnwindSafe for CodeMetrics
impl Send for CodeMetrics
impl Sync for CodeMetrics
impl Unpin for CodeMetrics
impl UnwindSafe for CodeMetrics
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<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