pub struct SizeMetrics {
pub total_lines: usize,
pub source_lines: usize,
pub logical_lines: usize,
pub comment_lines: usize,
pub blank_lines: usize,
pub num_classes: usize,
pub num_methods: usize,
pub num_functions: usize,
pub code_density: f64,
pub comment_ratio: f64,
}Fields§
§total_lines: usize§source_lines: usize§logical_lines: usize§comment_lines: usize§blank_lines: usize§num_classes: usize§num_methods: usize§num_functions: usize§code_density: f64§comment_ratio: f64Implementations§
Source§impl SizeMetrics
impl SizeMetrics
pub fn new() -> Self
pub fn calculate_ratios(&mut self)
Trait Implementations§
Source§impl Clone for SizeMetrics
impl Clone for SizeMetrics
Source§fn clone(&self) -> SizeMetrics
fn clone(&self) -> SizeMetrics
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 SizeMetrics
impl Debug for SizeMetrics
Source§impl<'de> Deserialize<'de> for SizeMetrics
impl<'de> Deserialize<'de> for SizeMetrics
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
Auto Trait Implementations§
impl Freeze for SizeMetrics
impl RefUnwindSafe for SizeMetrics
impl Send for SizeMetrics
impl Sync for SizeMetrics
impl Unpin for SizeMetrics
impl UnsafeUnpin for SizeMetrics
impl UnwindSafe for SizeMetrics
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> 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