pub trait Command {
// Required method
fn action_type(&self) -> ActionType;
// Provided methods
fn execute(&self) -> Result<()> { ... }
fn undo(&self) -> Result<()> { ... }
}Required Methods§
fn action_type(&self) -> ActionType
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".