Struct lcov::report::Report [] [src]

pub struct Report {
    pub sections: Sections,
}

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

Coverage information about every source files.

Methods

impl Report
[src]

[src]

Creates an empty report.

Examples

use lcov::Report;
let report = Report::new();

[src]

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)?;

[src]

Creates a report from LCOV tracefile.

Examples

use lcov::Report;

let report = Report::from_file("report.info")?;

[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")?)?;

[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")?);

Important traits for IntoRecords
[src]

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 Debug for Report
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Report
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Report
[src]

[src]

Returns the "default value" for a type. Read more

impl Eq for Report
[src]

impl PartialEq for Report
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl Send for Report

impl Sync for Report