pub struct AssertionStats {
pub total_checks: usize,
pub successes: usize,
}Expand description
Statistics for a tracked assertion.
Records the total number of times an assertion was checked and how many times it succeeded, enabling calculation of success rates for probabilistic properties in distributed systems.
Fields§
§total_checks: usizeTotal number of times this assertion was evaluated
successes: usizeNumber of times the assertion condition was true
Implementations§
Source§impl AssertionStats
impl AssertionStats
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Calculate the success rate as a percentage (0.0 to 100.0).
Returns 0.0 if no checks have been performed yet.
Calculate the success rate as a percentage (0.0 to 100.0).
Trait Implementations§
Source§impl Clone for AssertionStats
impl Clone for AssertionStats
Source§fn clone(&self) -> AssertionStats
fn clone(&self) -> AssertionStats
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssertionStats
impl Debug for AssertionStats
Source§impl Default for AssertionStats
impl Default for AssertionStats
Source§impl PartialEq for AssertionStats
impl PartialEq for AssertionStats
impl StructuralPartialEq for AssertionStats
Auto Trait Implementations§
impl Freeze for AssertionStats
impl RefUnwindSafe for AssertionStats
impl Send for AssertionStats
impl Sync for AssertionStats
impl Unpin for AssertionStats
impl UnwindSafe for AssertionStats
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)