pub struct CoverageConfig {
pub minimum_coverage: f64,
pub module_thresholds: HashMap<String, f64>,
pub output_formats: Vec<String>,
pub exclude_patterns: Vec<String>,
pub include_patterns: Vec<String>,
pub output_directory: PathBuf,
pub coverage_tool: CoverageTool,
pub fail_on_regression: bool,
pub baseline_coverage: Option<f64>,
}Expand description
Configuration for coverage collection and analysis
Fields§
§minimum_coverage: f64Minimum overall coverage percentage required
module_thresholds: HashMap<String, f64>Minimum coverage per module
output_formats: Vec<String>Output formats to generate
exclude_patterns: Vec<String>Patterns to exclude from coverage
include_patterns: Vec<String>Include patterns (if empty, includes all)
output_directory: PathBufDirectory for coverage output
coverage_tool: CoverageToolCoverage tool to use
fail_on_regression: boolWhether to fail on coverage regression
baseline_coverage: Option<f64>Historical coverage data for regression detection
Implementations§
Source§impl CoverageConfig
impl CoverageConfig
Sourcepub fn new() -> CoverageConfig
pub fn new() -> CoverageConfig
Create a new coverage configuration
Sourcepub fn with_minimum_coverage(self, threshold: f64) -> CoverageConfig
pub fn with_minimum_coverage(self, threshold: f64) -> CoverageConfig
Set minimum overall coverage threshold
Sourcepub fn with_output_format(self, formats: Vec<&str>) -> CoverageConfig
pub fn with_output_format(self, formats: Vec<&str>) -> CoverageConfig
Set output formats
Sourcepub fn with_exclude_patterns(self, patterns: Vec<&str>) -> CoverageConfig
pub fn with_exclude_patterns(self, patterns: Vec<&str>) -> CoverageConfig
Set exclude patterns
Sourcepub fn with_module_threshold(
self,
module: &str,
threshold: f64,
) -> CoverageConfig
pub fn with_module_threshold( self, module: &str, threshold: f64, ) -> CoverageConfig
Set module-specific coverage thresholds
Sourcepub fn with_baseline_coverage(self, baseline: f64) -> CoverageConfig
pub fn with_baseline_coverage(self, baseline: f64) -> CoverageConfig
Set baseline coverage for regression detection
Trait Implementations§
Source§impl Clone for CoverageConfig
impl Clone for CoverageConfig
Source§fn clone(&self) -> CoverageConfig
fn clone(&self) -> CoverageConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoverageConfig
impl Debug for CoverageConfig
Source§impl Default for CoverageConfig
impl Default for CoverageConfig
Source§fn default() -> CoverageConfig
fn default() -> CoverageConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CoverageConfig
impl<'de> Deserialize<'de> for CoverageConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CoverageConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CoverageConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CoverageConfig
impl Serialize for CoverageConfig
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CoverageConfig
impl RefUnwindSafe for CoverageConfig
impl Send for CoverageConfig
impl Sync for CoverageConfig
impl Unpin for CoverageConfig
impl UnwindSafe for CoverageConfig
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
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>
Converts
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>
Converts
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