fn run(&self, matches: &clap::ArgMatches) -> Result<(), String> {
        match self {
            SelectedFractal::BarnsleyFern => run_chaos_game(
                &|| {
                    barnsleyfern::BarnsleyFern::new(
                        &barnsleyfern::REFERENCE_TRANSFORMS,
                        &barnsleyfern::REFERENCE_WEIGHTS,
                    )
                },
                matches,
            ),
            SelectedFractal::BurningMandel => run_escape_time(&BurningMandel::new, matches),
            SelectedFractal::BurningShip => run_escape_time(&BurningShip::new, matches),
            SelectedFractal::Cesaro => run_turtle(
                &LindenmayerSystemTurtleProgram::build(CesaroFractal::new),
                matches,
            ),
            SelectedFractal::CesaroTri => run_turtle(
                &LindenmayerSystemTurtleProgram::build(CesaroTriFractal::new),
                matches,
            ),
            SelectedFractal::Dragon => run_turtle(&DragonFractal::new, matches),
            SelectedFractal::KochCurve => run_turtle(
                &|iteration| LindenmayerSystemTurtleProgram::new(KochCurve::new(iteration)),
                matches,
            ),
            SelectedFractal::LevyCCurve => run_turtle(
                &LindenmayerSystemTurtleProgram::build(LevyCCurve::new),
                matches,
            ),
            SelectedFractal::Mandelbrot => run_escape_time(&Mandelbrot::new, matches),
            SelectedFractal::RoadRunner => run_escape_time(&RoadRunner::new, matches),
            SelectedFractal::Sierpinski => run_chaos_game(&SierpinskiChaosGame::new, matches),
            SelectedFractal::TerDragon => run_turtle(
                &LindenmayerSystemTurtleProgram::build(TerdragonFractal::new),
                matches,
            ),
        }
    }
/// Parses the clap arguments for the command launches an animated renderer for the specified
/// fractal variant.
Parses the clap arguments for the command launches an animated renderer for the specified
fractal variant.
Parses the clap arguments for the command launches an animated renderer for the specified fractal variant .
fn run(&self, matches: &clap::ArgMatches) -> Result<(), String> {
        match self {
            SelectedFractal::BarnsleyFern => run_chaos_game(
                &|| {
                    barnsleyfern::BarnsleyFern::new(
                        &barnsleyfern::REFERENCE_TRANSFORMS,
                        &barnsleyfern::REFERENCE_WEIGHTS,
                    )
                },
                matches,
            ),
            SelectedFractal::BurningMandel => run_escape_time(&BurningMandel::new, matches),
            SelectedFractal::BurningShip => run_escape_time(&BurningShip::new, matches),
            SelectedFractal::Cesaro => run_turtle(
                &LindenmayerSystemTurtleProgram::build(CesaroFractal::new),
                matches,
            ),
            SelectedFractal::CesaroTri => run_turtle(
                &LindenmayerSystemTurtleProgram::build(CesaroTriFractal::new),
                matches,
            ),
            SelectedFractal::Dragon => run_turtle(&DragonFractal::new, matches),
            SelectedFractal::KochCurve => run_turtle(
                &|iteration| LindenmayerSystemTurtleProgram::new(KochCurve::new(iteration)),
                matches,
            ),
            SelectedFractal::LevyCCurve => run_turtle(
                &LindenmayerSystemTurtleProgram::build(LevyCCurve::new),
                matches,
            ),
            SelectedFractal::Mandelbrot => run_escape_time(&Mandelbrot::new, matches),
            SelectedFractal::RoadRunner => run_escape_time(&RoadRunner::new, matches),
            SelectedFractal::Sierpinski => run_chaos_game(&SierpinskiChaosGame::new, matches),
            SelectedFractal::TerDragon => run_turtle(
                &LindenmayerSystemTurtleProgram::build(TerdragonFractal::new),
                matches,
            ),
        }
    }
fn run ( & self , matches : & clap :: ArgMatches ) -> Result < ( ) , String > { match self { SelectedFractal :: BarnsleyFern => run_chaos_game ( & | | { barnsleyfern :: BarnsleyFern :: new ( & barnsleyfern :: REFERENCE_TRANSFORMS , & barnsleyfern :: REFERENCE_WEIGHTS , ) } , matches , ) , SelectedFractal :: BurningMandel => run_escape_time ( & BurningMandel :: new , matches ) , SelectedFractal :: BurningShip => run_escape_time ( & BurningShip :: new , matches ) , SelectedFractal :: Cesaro => run_turtle ( & LindenmayerSystemTurtleProgram :: build ( CesaroFractal :: new ) , matches , ) , SelectedFractal :: CesaroTri => run_turtle ( & LindenmayerSystemTurtleProgram :: build ( CesaroTriFractal :: new ) , matches , ) , SelectedFractal :: Dragon => run_turtle ( & DragonFractal :: new , matches ) , SelectedFractal :: KochCurve => run_turtle ( & | iteration | LindenmayerSystemTurtleProgram :: new ( KochCurve :: new ( iteration ) ) , matches , ) , SelectedFractal :: LevyCCurve => run_turtle ( & LindenmayerSystemTurtleProgram :: build ( LevyCCurve :: new ) , matches , ) , SelectedFractal :: Mandelbrot => run_escape_time ( & Mandelbrot :: new , matches ) , SelectedFractal :: RoadRunner => run_escape_time ( & RoadRunner :: new , matches ) , SelectedFractal :: Sierpinski => run_chaos_game ( & SierpinskiChaosGame :: new , matches ) , SelectedFractal :: TerDragon => run_turtle ( & LindenmayerSystemTurtleProgram :: build ( TerdragonFractal :: new ) , matches , ) , } }
Parses the clap arguments for the command launches an animated renderer for the specified
fractal variant.
Parses the clap arguments for the command launches an animated renderer for the specified fractal variant .
&self
matches
&clap::ArgMatches