Skip to main content

Command

Trait Command 

Source
pub trait Command {
    // Required method
    fn action_type(&self) -> ActionType;

    // Provided methods
    fn execute(&self) -> Result<()> { ... }
    fn undo(&self) -> Result<()> { ... }
}

Required Methods§

Provided Methods§

Source

fn execute(&self) -> Result<()>

Source

fn undo(&self) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§