pub struct FileCoverage {
pub path: String,
pub lines_total: usize,
pub lines_covered: usize,
pub branches_total: usize,
pub branches_covered: usize,
pub functions_total: usize,
pub functions_covered: usize,
}Expand description
Test coverage metrics for individual files
Fields§
§path: String§lines_total: usize§lines_covered: usize§branches_total: usize§branches_covered: usize§functions_total: usize§functions_covered: usizeImplementations§
Source§impl FileCoverage
impl FileCoverage
Sourcepub fn line_coverage_percentage(&self) -> f64
pub fn line_coverage_percentage(&self) -> f64
Sourcepub fn branch_coverage_percentage(&self) -> f64
pub fn branch_coverage_percentage(&self) -> f64
§Examples
use ruchy::quality::coverage::FileCoverage;
let mut instance = FileCoverage::new();
let result = instance.branch_coverage_percentage();
// Verify behavior§Examples
ⓘ
use ruchy::quality::coverage::branch_coverage_percentage;
let result = branch_coverage_percentage(());
assert_eq!(result, Ok(()));Sourcepub fn function_coverage_percentage(&self) -> f64
pub fn function_coverage_percentage(&self) -> f64
Trait Implementations§
Source§impl Clone for FileCoverage
impl Clone for FileCoverage
Source§fn clone(&self) -> FileCoverage
fn clone(&self) -> FileCoverage
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 FileCoverage
impl Debug for FileCoverage
Source§impl<'de> Deserialize<'de> for FileCoverage
impl<'de> Deserialize<'de> for FileCoverage
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 FileCoverage
impl RefUnwindSafe for FileCoverage
impl Send for FileCoverage
impl Sync for FileCoverage
impl Unpin for FileCoverage
impl UnwindSafe for FileCoverage
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