handle_reset

Function handle_reset 

Source
fn handle_reset(
    args: &Reset,
    main_epoch: &mut EpochConfig,
) -> Result<(), AppError>
Expand description

Handle the reset sub-command.

Deletes all epochs whose identifier is greater than the current one, effectively rolling back to the present epoch.

§Arguments

  • main_epoch - mutable reference to the current EpochConfig (the cli_epoch::Reset argument is unused).

§Returns

  • Ok(()) if all future epochs were successfully removed.
  • Err(AppError) if any deletion fails.