pub struct Puzzle {
pub year: Year,
pub day: Day,
}Expand description
A specific puzzle: one day of one year.
Fields§
§year: YearThe event year.
day: DayThe day within the event.
Implementations§
Source§impl Puzzle
impl Puzzle
Sourcepub const fn new(year: Year, day: Day) -> Option<Self>
pub const fn new(year: Year, day: Day) -> Option<Self>
Creates a puzzle, rejecting a day the event never published.
Both coordinates are valid on their own, but not every pairing is: from
Year::FIRST_SHORT on the event stops after Day::LAST_SHORT.
Trait Implementations§
impl Copy for Puzzle
impl Eq for Puzzle
Source§impl Ord for Puzzle
impl Ord for Puzzle
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Puzzle
impl PartialOrd for Puzzle
impl StructuralPartialEq for Puzzle
Auto Trait Implementations§
impl Freeze for Puzzle
impl RefUnwindSafe for Puzzle
impl Send for Puzzle
impl Sync for Puzzle
impl Unpin for Puzzle
impl UnsafeUnpin for Puzzle
impl UnwindSafe for Puzzle
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.