undo

gest undo: undo the last command.

struct Command

source

pub struct Command

Undo the last command.

Field Type Description
steps u32 Number of commands to undo.

Implements FromArgMatches, Args, Debug.

Command::call

source

pub async fn call(&self, context: &AppContext) -> Result<(), Error>

Roll back the most recent steps undoable transactions for the current project.

Each transaction is undone atomically, newest first, and printed when it is done. When one fails, the ones before it stay undone and the failed one and every older one are left as they were, so running the command again resumes from the failed one.

A transaction that gest recorded before join-table events carried their key can never be undone. It is skipped with a warning, marked so that undo does not offer it again, and does not count as a step.

Parameter Type Description
context &AppContext the application context: settings, store and current project
returns Result<(), Error> Ok(()) when the command succeeds, or the error that stopped it.