Day

Trait Day 

Source
pub trait Day<const DAY: u8>: Part<1, DAY> + Part<2, DAY> {
    // Required methods
    fn part1(input: &str) -> impl Display;
    fn part2(input: &str) -> impl Display;
}
Expand description

Solution for both parts of a day

It is auto-implemented for any type that implements Part for both parts of a day.

Required Methods§

Source

fn part1(input: &str) -> impl Display

Solves the puzzle for that part 1 of the day.

Source

fn part2(input: &str) -> impl Display

Solves the puzzle for that part 2 of the day.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, const DAY: u8> Day<DAY> for T
where T: Part<1, DAY> + Part<2, DAY>,