pub struct CoverageReport {
pub modules: Vec<CoverageModule>,
pub executed: usize,
pub total: usize,
}Expand description
What a whole run covered: the modules it entered, and the totals over them.
Fields§
§modules: Vec<CoverageModule>One per module the run loaded. A module nothing required is not here at all — it
has no coverage to report, which is crate::unused’s question rather than this
one.
executed: usizeStatements run, summed over the modules.
total: usizeStatements those modules have, summed. The pair is the percentage a summary line prints.
Implementations§
Source§impl CoverageReport
impl CoverageReport
Sourcepub fn lcov(&self, root: &Path) -> String
pub fn lcov(&self, root: &Path) -> String
The run as an lcov tracefile, one record per module in the report’s order: what
Codecov, Coveralls, GitLab, genhtml and editor gutters read. htl test --lcov
implies --coverage and leaves the table and the JSON as they are.
DA is one entry per line a statement starts on, with a count of 1 or 0:
the hook records whether a line ran, not how often, and a number it does not
have is not invented. Two statements starting on one line share the entry, so
LF / LH equal the table’s total / executed except on such lines. FN /
FNDA are the classic two-field forms every consumer reads; there is no branch
data, so no BRDA. SF is relative to root (the project root, so the file
resolves against the repository wherever CI ran the command), absolute when the
module is outside it.
Trait Implementations§
Source§impl Clone for CoverageReport
impl Clone for CoverageReport
Source§fn clone(&self) -> CoverageReport
fn clone(&self) -> CoverageReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CoverageReport
impl Debug for CoverageReport
Source§impl Default for CoverageReport
impl Default for CoverageReport
Source§fn default() -> CoverageReport
fn default() -> CoverageReport
Source§impl Serialize for CoverageReport
impl Serialize for CoverageReport
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for CoverageReport
impl RefUnwindSafe for CoverageReport
impl Send for CoverageReport
impl Sync for CoverageReport
impl Unpin for CoverageReport
impl UnsafeUnpin for CoverageReport
impl UnwindSafe for CoverageReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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