pub struct Coverage {
pub contributors: usize,
pub members: usize,
}Expand description
How much of a sum’s membership actually contributed to it.
contributors is never greater than members; a coverage where they are equal is a
complete sum, and one where contributors is zero means nothing could be read at
all — in which case the accompanying MetricState is unavailable rather than zero.
Fields§
§contributors: usizeMembers whose value was readable and went into the sum.
members: usizeMembers the subtree holds.
Implementations§
Source§impl Coverage
impl Coverage
Sourcepub const fn is_complete(&self) -> bool
pub const fn is_complete(&self) -> bool
Whether every member contributed, making the sum exact.
The share of members that contributed, for display.
None for an empty membership rather than 100%: a share of nothing is not
complete, it is undefined, and §4 forbids inventing the difference.
Trait Implementations§
impl Copy for Coverage
impl Eq for Coverage
impl StructuralPartialEq for Coverage
Auto Trait Implementations§
impl Freeze for Coverage
impl RefUnwindSafe for Coverage
impl Send for Coverage
impl Sync for Coverage
impl Unpin for Coverage
impl UnsafeUnpin for Coverage
impl UnwindSafe for Coverage
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