pub struct CoverageMapping<'a> {
pub mapping_info: Vec<CoverageMappingInfo>,
/* private fields */
}Expand description
Stores the instrumentation profile and information from the coverage mapping sections in the object files in order to construct a coverage report. Inspired, from the LLVM implementation with some differences/simplifications due to the fact this only hands instrumentation profiles for coverage.
So what the LLVM one has that this one doesn’t yet:
- DenseMap<size_t, DenseSet<size_t>> RecordProvenance
- std::vector
functions (this is probably taken straight from InstrumentationProfile - DenseMap<size_t, SmallVector<unsigned, 0>> FilenameHash2RecordIndices
- Vec<Pair<String, u64>> FuncHashMismatches
Fields§
§mapping_info: Vec<CoverageMappingInfo>Implementations§
Source§impl<'a> CoverageMapping<'a>
impl<'a> CoverageMapping<'a>
pub fn new( object_files: &[PathBuf], profile: &'a InstrumentationProfile, allow_parsing_failures: bool, ) -> Result<Self>
pub fn generate_subreport<P>(&self, predicate: P) -> CoverageReport
pub fn generate_report(&self) -> CoverageReport
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CoverageMapping<'a>
impl<'a> RefUnwindSafe for CoverageMapping<'a>
impl<'a> Send for CoverageMapping<'a>
impl<'a> Sync for CoverageMapping<'a>
impl<'a> Unpin for CoverageMapping<'a>
impl<'a> UnwindSafe for CoverageMapping<'a>
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