pub struct AocEntry {
pub day: u32,
pub part: u32,
pub year: Option<i32>,
pub func: fn(String) -> String,
}Expand description
A registered Advent of Code solution.
Instances of this type are created by the #[star] attribute macro in the
aoc-star-derive crate and collected via the inventory crate. You
usually do not construct this type directly.
day: The Advent of Code day (1–25).part: The part of the puzzle (1 or 2).year: The Advent of Code year; ifNone, the solution is considered year-agnostic and will be used for any year that does not have a more specific solution.func: The solution function, which must take the puzzle input as aStringand return the answer as aString.
Fields§
§day: u32Advent of Code day number (1–25).
part: u32Puzzle part (usually 1 or 2).
year: Option<i32>Advent of Code year, or None for year-agnostic solutions.
func: fn(String) -> StringThe solution function that processes the puzzle input and returns the answer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AocEntry
impl RefUnwindSafe for AocEntry
impl Send for AocEntry
impl Sync for AocEntry
impl Unpin for AocEntry
impl UnwindSafe for AocEntry
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