#[non_exhaustive]pub struct CoverageRange {
pub min: f64,
pub max: f64,
}Expand description
Inclusive coverage range filter.
Both endpoints are validated to be in [0.0, 100.0] and min <= max
at construction time; downstream consumers can rely on these
invariants without re-checking. Construct via CoverageRange::new
— direct field initialization is intentionally blocked by
#[non_exhaustive].
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.min: f64Lower bound (inclusive), in [0.0, 100.0], finite, <= max.
max: f64Upper bound (inclusive), in [0.0, 100.0], finite, >= min.
Implementations§
Source§impl CoverageRange
impl CoverageRange
Sourcepub fn new(min: f64, max: f64) -> Result<Self, CoverageRangeError>
pub fn new(min: f64, max: f64) -> Result<Self, CoverageRangeError>
Construct a validated range. Returns CoverageRangeError when
either endpoint is outside [0.0, 100.0] (including non-finite),
or when min > max.
Trait Implementations§
Source§impl Clone for CoverageRange
impl Clone for CoverageRange
Source§fn clone(&self) -> CoverageRange
fn clone(&self) -> CoverageRange
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 CoverageRange
impl Debug for CoverageRange
Source§impl Serialize for CoverageRange
impl Serialize for CoverageRange
impl Copy for CoverageRange
Auto Trait Implementations§
impl Freeze for CoverageRange
impl RefUnwindSafe for CoverageRange
impl Send for CoverageRange
impl Sync for CoverageRange
impl Unpin for CoverageRange
impl UnsafeUnpin for CoverageRange
impl UnwindSafe for CoverageRange
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