Expand description
The result of merging two commands.
The merge!
macro can be used for convenience when merging commands.
Implementations§
Trait Implementations§
source§impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Command<R> for Merged<R, C1, C2>
impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Command<R> for Merged<R, C1, C2>
source§fn apply(&mut self, receiver: &mut R) -> Result<(), Box<dyn Error + Send + Sync>>
fn apply(&mut self, receiver: &mut R) -> Result<(), Box<dyn Error + Send + Sync>>
Applies the command on the receiver and returns
Ok
if everything went fine,
and Err
if something went wrong. Read moresource§fn undo(&mut self, receiver: &mut R) -> Result<(), Box<dyn Error + Send + Sync>>
fn undo(&mut self, receiver: &mut R) -> Result<(), Box<dyn Error + Send + Sync>>
Restores the state of the receiver as it was before the command was applied
and returns
Ok
if everything went fine, and Err
if something went wrong. Read more