pub trait Command<T>: Send {
// Required methods
fn apply(&mut self, target: &mut T) -> Result<(), String>;
fn undo(&mut self, target: &mut T) -> Result<(), String>;
fn description(&self) -> &str;
}Expand description
Eine umkehrbare Aktion.
Required Methods§
fn apply(&mut self, target: &mut T) -> Result<(), String>
fn undo(&mut self, target: &mut T) -> Result<(), String>
fn description(&self) -> &str
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".