[][src]Function minicov::capture_coverage

pub fn capture_coverage() -> Result<Vec<u8>, NoCoverageData>

Captures the coverage data for the current program and returns it as a binary blob.

The resulting blobs should be passed to the cargo minicov tool on the system used to build your program. This will generate .gcda files in your build directory which can be parsed by any GCOV-compatible tool such as lcov or grcov.

This function can be called multiple times. The coverage counters are reset after each call, so you will need to merge the results of each call with the cargo minicov tool.