pub struct FileCoverage {
pub lines_covered: RoaringBitmap,
pub lines_instrumented: RoaringBitmap,
pub branches: BTreeMap<(u32, u32), u64>,
pub functions: BTreeMap<String, u64>,
}Expand description
Coverage data for a single file.
Fields§
§lines_covered: RoaringBitmapLines that were executed at least once.
lines_instrumented: RoaringBitmapLines that are instrumented (could be executed).
branches: BTreeMap<(u32, u32), u64>Branch coverage: (line, block) → taken count. Optional.
functions: BTreeMap<String, u64>Function coverage: name → hit count. Optional.
Implementations§
Source§impl FileCoverage
impl FileCoverage
pub fn new() -> Self
Sourcepub fn line_coverage_pct(&self) -> Option<f64>
pub fn line_coverage_pct(&self) -> Option<f64>
Line coverage percentage (0.0–100.0). Returns None if no instrumented lines.
Sourcepub fn merge(&mut self, other: &FileCoverage)
pub fn merge(&mut self, other: &FileCoverage)
Merge another FileCoverage into this one (OR for bitmaps, sum for counts).
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
Auto Trait Implementations§
impl Freeze for FileCoverage
impl RefUnwindSafe for FileCoverage
impl Send for FileCoverage
impl Sync for FileCoverage
impl Unpin for FileCoverage
impl UnsafeUnpin 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