pub struct Coverage {
pub intended: u32,
pub used: u32,
pub missing: u32,
pub ambiguous: u32,
}Expand description
How much of what an analysis meant to use it actually used.
“Intended” comes from what a component should contain, not from what the file happened to have — so a residue whose side chain was never modelled reduces coverage rather than silently shrinking the calculation.
Fields§
§intended: u32Atoms the analysis meant to use.
used: u32Atoms it did use.
missing: u32Atoms absent from the model.
ambiguous: u32Atoms present but not uniquely resolvable.
Implementations§
Source§impl Coverage
impl Coverage
Sourcepub const fn complete(atoms: u32) -> Self
pub const fn complete(atoms: u32) -> Self
Coverage for an analysis that used everything it meant to.
Sourcepub fn fraction(self) -> f64
pub fn fraction(self) -> f64
The fraction of intended atoms that were used.
An analysis over two fifths of the intended atoms is not the same quantity as one over all of them, and this is what says so.
§Panics
The checked conversion accepts every unsigned 32-bit count.
Sourcepub const fn is_complete(self) -> bool
pub const fn is_complete(self) -> bool
Returns true when nothing was missing or ambiguous.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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