#[non_exhaustive]pub enum Verdict {
Correct,
Incorrect {
hint: Option<Hint>,
wait: Option<Duration>,
},
AlreadyComplete {
correct: bool,
},
WrongLevel,
}Expand description
How Advent of Code judged a submitted answer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Correct
The answer was accepted.
Incorrect
The answer was rejected.
Fields
AlreadyComplete
The part was already solved, so the site refused to judge the submission at all.
The answer was compared against the one the puzzle page shows as accepted instead, which costs one further request.
WrongLevel
The site was not asking for an answer to that part at all.
It says the same thing in two situations and distinguishes neither: the part is not open yet, because part one is still unsolved; or the part was never a question, which is day 25’s second star - that day has one puzzle, and its second star is awarded for holding the other forty-nine. Either way nothing was judged and nothing was wrong.
Implementations§
Trait Implementations§
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 UnsafeUnpin 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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.