Skip to main content

Command

Trait Command 

Source
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§

Source

fn apply(&mut self, target: &mut T) -> Result<(), String>

Source

fn undo(&mut self, target: &mut T) -> Result<(), String>

Source

fn description(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§