pub trait Edit {
type Target;
type Output;
// Required methods
fn edit(&mut self, target: &mut Self::Target) -> Self::Output;
fn undo(&mut self, target: &mut Self::Target) -> Self::Output;
// Provided methods
fn redo(&mut self, target: &mut Self::Target) -> Self::Output { ... }
fn merge(&mut self, other: Self) -> Merged<Self>
where Self: Sized { ... }
}
Expand description
Base functionality for all edit commands.
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn redo(&mut self, target: &mut Self::Target) -> Self::Output
fn redo(&mut self, target: &mut Self::Target) -> Self::Output
Reapplies the edit on the target.
The default implementation uses the Edit::edit
implementation.