Struct undo::Merged [−][src]
The result of merging two commands.
The merge!
macro can be used for convenience when merging commands.
Methods
impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Merged<R, C1, C2>
[src]
impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Merged<R, C1, C2>
pub fn new(cmd1: C1, cmd2: C2) -> Merged<R, C1, C2>
[src]
pub fn new(cmd1: C1, cmd2: C2) -> Merged<R, C1, C2>
pub fn into_commands(self) -> (C1, C2)
[src]
pub fn into_commands(self) -> (C1, C2)
Returns the two merged commands.
Trait Implementations
impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Command<R> for Merged<R, C1, C2>
[src]
impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Command<R> for Merged<R, C1, C2>
fn apply(&mut self, receiver: &mut R) -> Result<(), Box<Error + Send + Sync>>
[src]
fn apply(&mut self, receiver: &mut R) -> Result<(), Box<Error + Send + Sync>>
Applies the command on the receiver and returns Ok
if everything went fine, and Err
if something went wrong. Read more
fn undo(&mut self, receiver: &mut R) -> Result<(), Box<Error + Send + Sync>>
[src]
fn undo(&mut self, receiver: &mut R) -> Result<(), Box<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
fn redo(&mut self, receiver: &mut R) -> Result<(), Box<Error + Send + Sync>>
[src]
fn redo(&mut self, receiver: &mut R) -> Result<(), Box<Error + Send + Sync>>
Reapplies the command on the receiver and return Ok
if everything went fine, and Err
if something went wrong. Read more
fn id(&self) -> Option<u32>
[src]
fn id(&self) -> Option<u32>
Used for automatic merging of commands. Read more
impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Debug for Merged<R, C1, C2>
[src]
impl<R, C1: Command<R> + 'static, C2: Command<R> + 'static> Debug for Merged<R, C1, C2>