pub enum CheckOutcome {
Pass,
Fail {
detail: String,
},
NotRun {
reason: String,
},
}Expand description
The verdict for a single lesson check.
A sum type, not a bool, so per-check verdicts stay distinct and the grader
never folds them into one aggregate (§1.2). Three real states: the check
passed, the submission ran and violated it, and — kept deliberately separate
from a failure (§3.3) — the submission could not run at all, so no check ever
got a verdict.
Serializable so the run command’s RunReport can
carry the per-check outcomes into its JSON form; the externally-tagged shape
round-trips each variant losslessly.
Variants§
Pass
The submission satisfied the check.
Fail
The check ran and the submission violated it.
Fields
NotRun
The submission could not be executed at all (a syntax error, or the
interpreter failed to launch), so this check never ran. Distinct from
Fail: the submission was never even evaluated.
Trait Implementations§
Source§impl Clone for CheckOutcome
impl Clone for CheckOutcome
Source§fn clone(&self) -> CheckOutcome
fn clone(&self) -> CheckOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckOutcome
impl Debug for CheckOutcome
Source§impl<'de> Deserialize<'de> for CheckOutcome
impl<'de> Deserialize<'de> for CheckOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CheckOutcome
impl PartialEq for CheckOutcome
Source§impl Serialize for CheckOutcome
impl Serialize for CheckOutcome
impl Eq for CheckOutcome
impl StructuralPartialEq for CheckOutcome
Auto Trait Implementations§
impl Freeze for CheckOutcome
impl RefUnwindSafe for CheckOutcome
impl Send for CheckOutcome
impl Sync for CheckOutcome
impl Unpin for CheckOutcome
impl UnwindSafe for CheckOutcome
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.