pub struct CombinedCoverageReport {
pub line_coverage: LineCoverageReport,
pub pixel_coverage: PixelCoverageReport,
pub overall_score: f32,
pub meets_threshold: bool,
pub line_weight: f32,
pub pixel_weight: f32,
}Expand description
Combined coverage report (line + pixel coverage)
Fields§
§line_coverage: LineCoverageReportLine/element coverage (logical)
pixel_coverage: PixelCoverageReportPixel/region coverage (visual)
overall_score: f32Overall score (weighted average)
meets_threshold: boolMeets threshold
line_weight: f32Weight for line coverage (0.0 - 1.0)
pixel_weight: f32Weight for pixel coverage (0.0 - 1.0)
Implementations§
Source§impl CombinedCoverageReport
impl CombinedCoverageReport
Sourcepub const DEFAULT_LINE_WEIGHT: f32 = 0.5
pub const DEFAULT_LINE_WEIGHT: f32 = 0.5
Default weight for line coverage (50%)
Sourcepub const DEFAULT_PIXEL_WEIGHT: f32 = 0.5
pub const DEFAULT_PIXEL_WEIGHT: f32 = 0.5
Default weight for pixel coverage (50%)
Sourcepub const DEFAULT_THRESHOLD: f32 = 0.8
pub const DEFAULT_THRESHOLD: f32 = 0.8
Default threshold for meeting coverage requirements (80%)
Sourcepub fn from_parts(line: LineCoverageReport, pixel: PixelCoverageReport) -> Self
pub fn from_parts(line: LineCoverageReport, pixel: PixelCoverageReport) -> Self
Create from line and pixel reports with default weights
Sourcepub fn from_parts_weighted(
line: LineCoverageReport,
pixel: PixelCoverageReport,
line_weight: f32,
pixel_weight: f32,
) -> Self
pub fn from_parts_weighted( line: LineCoverageReport, pixel: PixelCoverageReport, line_weight: f32, pixel_weight: f32, ) -> Self
Create from line and pixel reports with custom weights
Sourcepub fn with_threshold(self, threshold: f32) -> Self
pub fn with_threshold(self, threshold: f32) -> Self
Set threshold and update meets_threshold
Sourcepub fn line_percent(&self) -> f32
pub fn line_percent(&self) -> f32
Get line coverage percentage (0-100)
Sourcepub fn pixel_percent(&self) -> f32
pub fn pixel_percent(&self) -> f32
Get pixel coverage percentage (0-100)
Sourcepub fn overall_percent(&self) -> f32
pub fn overall_percent(&self) -> f32
Get overall score percentage (0-100)
Trait Implementations§
Source§impl Clone for CombinedCoverageReport
impl Clone for CombinedCoverageReport
Source§fn clone(&self) -> CombinedCoverageReport
fn clone(&self) -> CombinedCoverageReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CombinedCoverageReport
impl Debug for CombinedCoverageReport
Source§impl Default for CombinedCoverageReport
impl Default for CombinedCoverageReport
Source§fn default() -> CombinedCoverageReport
fn default() -> CombinedCoverageReport
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CombinedCoverageReport
impl<'de> Deserialize<'de> for CombinedCoverageReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CombinedCoverageReport
impl RefUnwindSafe for CombinedCoverageReport
impl Send for CombinedCoverageReport
impl Sync for CombinedCoverageReport
impl Unpin for CombinedCoverageReport
impl UnsafeUnpin for CombinedCoverageReport
impl UnwindSafe for CombinedCoverageReport
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().