pub trait Knob<S> {
// Required methods
fn name(&self) -> &str;
fn range(&self) -> RangeInclusive<i32> ⓘ;
fn apply(&self, stage: &S, step: i32) -> Option<S>;
fn describe(&self, step: i32) -> String;
// Provided method
fn stride(&self) -> u32 { ... }
}Expand description
One way the game lets the search change a stage definition S: a
bounded integer step, 0 being the stage as authored.
Required Methods§
Sourcefn range(&self) -> RangeInclusive<i32> ⓘ
fn range(&self) -> RangeInclusive<i32> ⓘ
The steps it may take. It holds 0, the stage as authored.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".