Trait aoc_puzzle::puzzle::Puzzle

source ·
pub trait Puzzle {
Show 16 methods // Required methods fn dyn_puzzle(&self) -> &dyn Puzzle; fn name(&self) -> &'static str; fn year(&self) -> u16; fn day(&self) -> u8; fn num_parts(&self) -> usize; fn set_param_real(&mut self, name: String, value: String); // Provided methods fn part_one(&self, _lines: &[&str]) -> GenResult<String> { ... } fn part_two(&self, _lines: &[&str]) -> GenResult<String> { ... } fn commands(&self) -> Vec<PuzzleCommand> { ... } fn set_default_params(&mut self) { ... } fn set_param(&mut self, name: &str, value: String) { ... } fn invoke(&self, args: &[OsString]) -> GenResult<()> { ... } fn find_input_or_arg(&self, arg: &Option<PathBuf>) -> PathBuf { ... } fn find_input_or_default(&self) -> PathBuf { ... } fn find_input(&self) -> GenResult<PathBuf> { ... } fn load_input(&self) -> GenResult<String> { ... }
}

Required Methods§

source

fn dyn_puzzle(&self) -> &dyn Puzzle

source

fn name(&self) -> &'static str

source

fn year(&self) -> u16

source

fn day(&self) -> u8

source

fn num_parts(&self) -> usize

source

fn set_param_real(&mut self, name: String, value: String)

Provided Methods§

source

fn part_one(&self, _lines: &[&str]) -> GenResult<String>

source

fn part_two(&self, _lines: &[&str]) -> GenResult<String>

source

fn commands(&self) -> Vec<PuzzleCommand>

source

fn set_default_params(&mut self)

source

fn set_param(&mut self, name: &str, value: String)

source

fn invoke(&self, args: &[OsString]) -> GenResult<()>

source

fn find_input_or_arg(&self, arg: &Option<PathBuf>) -> PathBuf

source

fn find_input_or_default(&self) -> PathBuf

source

fn find_input(&self) -> GenResult<PathBuf>

source

fn load_input(&self) -> GenResult<String>

Implementors§