advent_of_code_2024::day_21

Trait Keys

source
trait Keys<T> {
    // Required methods
    fn coordinate(key: KeyPadButton<T>) -> (u8, u8);
    fn contains(coord: &(u8, u8)) -> bool;
}
Expand description

Encapsulates the layout of each set of keypad buttons

Required Methods§

source

fn coordinate(key: KeyPadButton<T>) -> (u8, u8)

What is the coordinate of a given button

source

fn contains(coord: &(u8, u8)) -> bool

Is this coordinate a valid button on this keypad

Object Safety§

This trait is not object safe.

Implementors§