pub struct ScenarioResult {
pub name: String,
pub passed: bool,
pub error: Option<String>,
pub actual_confidence: Option<f64>,
pub actual_decision: Option<GateDecision>,
pub duration_ms: f64,
}Expand description
Result of running a test scenario
Fields§
§name: StringScenario name
passed: boolWhether the test passed
error: Option<String>Error message if failed
actual_confidence: Option<f64>Actual confidence (if applicable)
actual_decision: Option<GateDecision>Actual gate decision (if applicable)
duration_ms: f64Duration in milliseconds
Implementations§
Source§impl ScenarioResult
impl ScenarioResult
Sourcepub fn fail(
name: impl Into<String>,
error: impl Into<String>,
duration_ms: f64,
) -> Self
pub fn fail( name: impl Into<String>, error: impl Into<String>, duration_ms: f64, ) -> Self
Create a failing result
Sourcepub fn with_confidence(self, confidence: f64) -> Self
pub fn with_confidence(self, confidence: f64) -> Self
Add actual confidence to result
Sourcepub fn with_decision(self, decision: GateDecision) -> Self
pub fn with_decision(self, decision: GateDecision) -> Self
Add actual decision to result
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScenarioResult
impl RefUnwindSafe for ScenarioResult
impl Send for ScenarioResult
impl Sync for ScenarioResult
impl Unpin for ScenarioResult
impl UnsafeUnpin for ScenarioResult
impl UnwindSafe for ScenarioResult
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