Trait undo::Action [−][src]
Base functionality for all actions.
Associated Types
Loading content...Required methods
fn apply(&mut self, target: &mut Self::Target) -> Result<Self>
[src]
Applies the action on the target and returns Ok
if everything went fine,
and Err
if something went wrong.
fn undo(&mut self, target: &mut Self::Target) -> Result<Self>
[src]
Restores the state of the target as it was before the action was applied
and returns Ok
if everything went fine, and Err
if something went wrong.
Provided methods
fn redo(&mut self, target: &mut Self::Target) -> Result<Self>
[src]
Reapplies the action on the target and return Ok
if everything went fine,
and Err
if something went wrong.
The default implementation uses the apply
implementation.
fn merge(&mut self, _: &mut Self) -> Merged
[src]
Used for manual merging of actions.