#[non_exhaustive]pub struct Outcome {
pub pass: bool,
pub score: f64,
pub reason: String,
pub excluded: bool,
pub judge: Option<Box<JudgeRecord>>,
}Expand description
The verdict of one assertion.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pass: bool§score: f64In 0..=1.
reason: String§excluded: boolLeave the result out of the test score, the gate and the metric means
(a judge’s unknown verdict with unknown: exclude).
judge: Option<Box<JudgeRecord>>What a judge workflow decided (judge assertions only).
Implementations§
Source§impl Outcome
impl Outcome
Sourcepub fn graded(pass: bool, score: f64, reason: impl Into<String>) -> Self
pub fn graded(pass: bool, score: f64, reason: impl Into<String>) -> Self
A graded verdict; score is clamped to 0..=1 (NaN becomes 0).
Sourcepub fn excluded(reason: impl Into<String>) -> Self
pub fn excluded(reason: impl Into<String>) -> Self
A result that is reported but neither scored nor gated.
Sourcepub fn with_judge(self, record: JudgeRecord) -> Self
pub fn with_judge(self, record: JudgeRecord) -> Self
Attach the judge’s details.
Trait Implementations§
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Forget for Outcome
impl Freeze for Outcome
impl Move for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
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