Trait cli::commands::Command

source ·
pub trait Command {
    // Required methods
    fn get_aliases(&self) -> Vec<&'static str> ;
    fn get_description(&self) -> &'static str;
    fn execute(&self, client: &mut ClientProxy, params: &[&str]);

    // Provided method
    fn get_params_help(&self) -> &'static str { ... }
}
Expand description

Trait to perform client operations.

Required Methods§

source

fn get_aliases(&self) -> Vec<&'static str>

all commands and aliases this command support.

source

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

string that describes what the command does.

source

fn execute(&self, client: &mut ClientProxy, params: &[&str])

code to execute.

Provided Methods§

source

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

string that describes params.

Implementors§