pub struct Join<A, B> { /* private fields */ }
Expand description
Two actions joined together.
Can be used to build more complex actions from simpler ones.
let mut target = String::new();
let mut record = Record::new();
let abc = Join::new(Push('a'), Push('b')).join(Push('c'));
record.apply(&mut target, abc);
assert_eq!(target, "abc");
record.undo(&mut target);
assert_eq!(target, "");
record.redo(&mut target);
assert_eq!(target, "abc");
Creates a new Join
from a
and b
.
The target type.
The output type.
Applies the action on the target.
Restores the state of the target as it was before the action was applied.
Reapplies the action on the target.
Read more
Used for manual merging of actions. See
Merged
for more information.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.