Trait Command

Source
pub trait Command {
    // Required methods
    fn execute(&self) -> Result<String>;
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
}
Expand description

Trait for commands that can be executed

Required Methods§

Source

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

Execute the command and return the result

Source

fn name(&self) -> &'static str

Get the command name for help and error messages

Source

fn description(&self) -> &'static str

Get a brief description of what the command does

Implementors§