[−][src]Struct lcov::report::Report
An accumulated coverage information from some LCOV tracefiles.
Report
is used for merging/filtering the coverage information.
Examples
Merges LCOV tracefiles and outputs the result in LCOV tracefile format:
use lcov::Report; let mut report = Report::new(); // Merges a first file. report.merge(Report::from_file("report_a.info")?)?; // Merges a second file. report.merge(Report::from_file("report_b.info")?)?; // Outputs the merge result in LCOV tracefile format. for record in report.into_records() { println!("{}", record); }
Fields
sections: Sections
Coverage information about every source files.
Implementations
impl Report
[src]
pub fn new() -> Self
[src]
pub fn from_reader<I, E>(iter: I) -> Result<Self, ParseError> where
I: IntoIterator<Item = Result<Record, E>>,
E: Into<ReadError>,
[src]
I: IntoIterator<Item = Result<Record, E>>,
E: Into<ReadError>,
Creates a report from LCOV record reader.
Examples
use lcov::{Report, Reader}; let input = "\ TN:test_name SF:/path/to/source/file.rs DA:1,2 DA:3,0 DA:5,6 LF:3 LH:2 end_of_record "; let reader = Reader::new(input.as_bytes()); let report = Report::from_reader(reader)?;
pub fn from_file<P>(path: P) -> Result<Self, ParseError> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Creates a report from LCOV tracefile.
Examples
use lcov::Report; let report = Report::from_file("report.info")?;
pub fn merge(&mut self, other: Self) -> Result<(), MergeError>
[src]
Merges a report into self
.
Examples
use lcov::Report; let mut report = Report::from_file("report1.info")?; report.merge(Report::from_file("report2.info")?)?;
pub fn merge_lossy(&mut self, other: Self)
[src]
Merges a report into self
with ignoring an Errors.
Examples
use lcov::Report; let mut report = Report::from_file("report1.info")?; report.merge_lossy(Report::from_file("report2.info")?);
pub fn into_records(self) -> IntoRecordsⓘImportant traits for IntoRecords
impl Iterator for IntoRecords type Item = Record;
[src]
Important traits for IntoRecords
impl Iterator for IntoRecords type Item = Record;
Creates an iterator which iterates over [LCOV section].
Examples
use lcov::Report; let mut report = Report::from_file("report.info")?; // ... Manipulate report for record in report.into_records() { println!("{}", record); }
Trait Implementations
impl Clone for Report
[src]
impl Debug for Report
[src]
impl Default for Report
[src]
impl Eq for Report
[src]
impl PartialEq<Report> for Report
[src]
impl StructuralEq for Report
[src]
impl StructuralPartialEq for Report
[src]
Auto Trait Implementations
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnwindSafe for Report
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,