pub enum Verdict {
Correct {
message: String,
},
Incorrect {
message: String,
},
}Expand description
A graded verdict on a submission: correct or incorrect, each carrying the learner-facing message.
A sum type, not a bool plus a message, so “correct with no message” and
contradictory states are unrepresentable and there is no public is_correct
(§1.2). This is what callers consume; the rig DTO (Feedback) stays an
implementation detail of this module.
Variants§
Correct
The submission satisfies the exercise.
Incorrect
The submission does not satisfy the exercise.
Trait Implementations§
Source§impl From<&Verdict> for ExpectedVerdict
impl From<&Verdict> for ExpectedVerdict
impl Eq for Verdict
impl StructuralPartialEq for Verdict
Auto Trait Implementations§
impl Freeze for Verdict
impl RefUnwindSafe for Verdict
impl Send for Verdict
impl Sync for Verdict
impl Unpin for Verdict
impl UnwindSafe for Verdict
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,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.