Skip to main content

Module puzzle

Module puzzle 

Source
Expand description

Validated puzzle coordinates.

Year and Day have private fields and fallible constructors, so an out-of-range value cannot reach path rendering or the Advent of Code API. Puzzle checks the pairing on top of that: from Year::FIRST_SHORT on the event stops after Day::LAST_SHORT.

Structs§

Day
A validated Advent of Code day, always within 1..=25.
Puzzle
A specific puzzle: one day of one year.
Year
A validated Advent of Code year.

Enums§

Part
Which half of a puzzle an answer belongs to.