Trait undo::Action [−][src]
pub trait Action { type Target; type Output; type Error; fn apply(&mut self, target: &mut Self::Target) -> Result<Self>; fn undo(&mut self, target: &mut Self::Target) -> Result<Self>; fn redo(&mut self, target: &mut Self::Target) -> Result<Self> { ... } fn merge(&mut self, _: &mut Self) -> Merged
where
Self: Sized, { ... } }
Expand description
Base functionality for all actions.
Associated Types
Required methods
Applies the action on the target and returns Ok
if everything went fine,
and Err
if something went wrong.
Provided methods
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.