Trait Score

Source
pub trait Score: Solve {
    // Required method
    fn score(&self) -> Option<usize>;

    // Provided method
    fn difficulty(&self) -> Option<Difficulty> { ... }
}
Expand description

Trait defining a puzzle with quantifiable difficulty.

Required Methods§

Source

fn score(&self) -> Option<usize>

The raw difficulty score of this puzzle.

Provided Methods§

Source

fn difficulty(&self) -> Option<Difficulty>

The graded difficulty score of this puzzle.

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§