pub struct CoverageRecord { /* private fields */ }Expand description
Coverage report with counts consistent with its lifecycle state.
Implementations§
Source§impl CoverageRecord
impl CoverageRecord
Sourcepub fn new(
scope: CoverageScope,
relation: Option<GraphRelationKind>,
state: CoverageState,
covered: u64,
omitted: u64,
generation: IndexGeneration,
reason: Option<GraphIdentityText>,
reached_limit: Option<GraphLimitKind>,
) -> Result<Self, GraphContractError>
pub fn new( scope: CoverageScope, relation: Option<GraphRelationKind>, state: CoverageState, covered: u64, omitted: u64, generation: IndexGeneration, reason: Option<GraphIdentityText>, reached_limit: Option<GraphLimitKind>, ) -> Result<Self, GraphContractError>
Construct a coverage row and enforce count/state consistency.
§Errors
Returns an error when counts overflow, contradict the selected state, omit a required reason, or claim the pre-publication zero generation.
Sourcepub const fn scope(&self) -> &CoverageScope
pub const fn scope(&self) -> &CoverageScope
Borrow the covered project or path scope.
Sourcepub const fn relation(&self) -> Option<GraphRelationKind>
pub const fn relation(&self) -> Option<GraphRelationKind>
Return the optional relation family covered by this row.
Sourcepub const fn state(&self) -> CoverageState
pub const fn state(&self) -> CoverageState
Return the coverage lifecycle state.
Sourcepub const fn generation(&self) -> IndexGeneration
pub const fn generation(&self) -> IndexGeneration
Return the complete generation associated with this row.
Sourcepub const fn reason(&self) -> Option<&GraphIdentityText>
pub const fn reason(&self) -> Option<&GraphIdentityText>
Borrow the actionable non-complete explanation, when present.
Sourcepub const fn reached_limit(&self) -> Option<GraphLimitKind>
pub const fn reached_limit(&self) -> Option<GraphLimitKind>
Return the product limit reached, when applicable.
Trait Implementations§
Source§impl Clone for CoverageRecord
impl Clone for CoverageRecord
Source§fn clone(&self) -> CoverageRecord
fn clone(&self) -> CoverageRecord
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 CoverageRecord
impl Debug for CoverageRecord
Source§impl PartialEq for CoverageRecord
impl PartialEq for CoverageRecord
Source§impl Serialize for CoverageRecord
impl Serialize for CoverageRecord
impl Eq for CoverageRecord
impl StructuralPartialEq for CoverageRecord
Auto Trait Implementations§
impl Freeze for CoverageRecord
impl RefUnwindSafe for CoverageRecord
impl Send for CoverageRecord
impl Sync for CoverageRecord
impl Unpin for CoverageRecord
impl UnwindSafe for CoverageRecord
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.