pub enum AdaptiveOutcome {
LeakDetected {
posterior: Posterior,
samples_per_class: usize,
elapsed_secs: f64,
},
NoLeakDetected {
posterior: Posterior,
samples_per_class: usize,
elapsed_secs: f64,
},
Inconclusive {
reason: InconclusiveReason,
posterior: Option<Posterior>,
samples_per_class: usize,
elapsed_secs: f64,
},
ThresholdElevated {
posterior: Posterior,
theta_user: f64,
theta_eff: f64,
theta_tick: f64,
achievable_at_max: bool,
samples_per_class: usize,
elapsed_secs: f64,
},
}Expand description
Outcome of an adaptive sampling decision (no_std compatible).
Uses f64 for elapsed time instead of std::time::Duration.
Variants§
LeakDetected
Leak probability exceeded fail threshold - timing leak detected.
Fields
NoLeakDetected
Leak probability dropped below pass threshold - no significant leak.
Fields
Inconclusive
A quality gate triggered before reaching a decision.
Fields
reason: InconclusiveReasonReason for stopping.
ThresholdElevated
Threshold was elevated and pass criterion was met at effective threshold (v5.5).
P < pass_threshold at θ_eff, but θ_eff > θ_user + ε. This is semantically distinct from both Pass (can’t guarantee user threshold) and Inconclusive (not a quality issue - we got a clear statistical result).
Fields
Implementations§
Source§impl AdaptiveOutcome
impl AdaptiveOutcome
Sourcepub fn leak_probability(&self) -> Option<f64>
pub fn leak_probability(&self) -> Option<f64>
Get the final leak probability, if available.
Sourcepub fn is_leak_detected(&self) -> bool
pub fn is_leak_detected(&self) -> bool
Check if the outcome indicates a leak was detected.
Sourcepub fn is_conclusive(&self) -> bool
pub fn is_conclusive(&self) -> bool
Check if the outcome is conclusive (either pass or fail).
Note: ThresholdElevated is NOT considered conclusive in v5.5 - it means we got a statistical result but can’t guarantee the user’s threshold.
Sourcepub fn is_threshold_elevated(&self) -> bool
pub fn is_threshold_elevated(&self) -> bool
Check if the threshold was elevated beyond tolerance (v5.5).
Sourcepub fn samples_per_class(&self) -> usize
pub fn samples_per_class(&self) -> usize
Get the number of samples per class.
Sourcepub fn elapsed_secs(&self) -> f64
pub fn elapsed_secs(&self) -> f64
Get elapsed time in seconds.
Sourcepub fn to_summary(&self, calibration: &Calibration) -> OutcomeSummary
pub fn to_summary(&self, calibration: &Calibration) -> OutcomeSummary
Convert to an FFI-friendly summary containing only scalar fields.
This centralizes the conversion logic that was previously duplicated across NAPI and C bindings, using canonical effect pattern classification.
Trait Implementations§
Source§impl Clone for AdaptiveOutcome
impl Clone for AdaptiveOutcome
Source§fn clone(&self) -> AdaptiveOutcome
fn clone(&self) -> AdaptiveOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AdaptiveOutcome
impl RefUnwindSafe for AdaptiveOutcome
impl Send for AdaptiveOutcome
impl Sync for AdaptiveOutcome
impl Unpin for AdaptiveOutcome
impl UnwindSafe for AdaptiveOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.