use super::types::*;
pub trait UndoCommand {
fn id(&self) -> CommandId;
fn description(&self) -> CommandDescription;
fn execute(&mut self) -> Result<(), String>;
fn undo(&mut self) -> Result<(), String>;
fn redo(&mut self) -> Result<(), String> {
self.execute()
}
fn merge_policy(&self) -> MergePolicy {
MergePolicy::Never
}
fn try_merge(&mut self, _previous: &dyn UndoCommand) -> bool {
false
}
}