pub struct MultipleTestingGuard { /* private fields */ }Expand description
Guard that tracks and warns about multiple testing
Implementations§
Source§impl MultipleTestingGuard
impl MultipleTestingGuard
Sourcepub fn with_method(self, method: CorrectionMethod) -> Self
pub fn with_method(self, method: CorrectionMethod) -> Self
Set the correction method
Sourcepub fn record_tests(&mut self, n: usize)
pub fn record_tests(&mut self, n: usize)
Record that N combinations were tested
Sourcepub fn combinations_tested(&self) -> usize
pub fn combinations_tested(&self) -> usize
Get the number of combinations tested
Sourcepub fn accept_risk(&mut self)
pub fn accept_risk(&mut self)
Suppress warnings (user explicitly accepts risk)
Sourcepub fn is_risk_accepted(&self) -> bool
pub fn is_risk_accepted(&self) -> bool
Check if risk has been accepted
Sourcepub fn adjusted_alpha(&self) -> f64
pub fn adjusted_alpha(&self) -> f64
Calculate the adjusted alpha based on correction method
Sourcepub fn warning_level(&self) -> WarningLevel
pub fn warning_level(&self) -> WarningLevel
Determine warning level based on combinations tested
Sourcepub fn get_stats(&self) -> MultipleTestingStats
pub fn get_stats(&self) -> MultipleTestingStats
Get current statistics and warnings
Sourcepub fn emit_warning_if_needed(&self)
pub fn emit_warning_if_needed(&self)
Print warning to stderr if needed
Trait Implementations§
Source§impl Clone for MultipleTestingGuard
impl Clone for MultipleTestingGuard
Source§fn clone(&self) -> MultipleTestingGuard
fn clone(&self) -> MultipleTestingGuard
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 MultipleTestingGuard
impl Debug for MultipleTestingGuard
Auto Trait Implementations§
impl Freeze for MultipleTestingGuard
impl RefUnwindSafe for MultipleTestingGuard
impl Send for MultipleTestingGuard
impl Sync for MultipleTestingGuard
impl Unpin for MultipleTestingGuard
impl UnsafeUnpin for MultipleTestingGuard
impl UnwindSafe for MultipleTestingGuard
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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