Skip to main content

Command

Trait Command 

Source
pub trait Command:
    Send
    + Sync
    + 'static {
    // Required methods
    fn commands(&self) -> &'static [&'static str];
    fn help(&self) -> &'static str;
    fn run(&self, s: &Hackshell, cmd: &[&str]) -> CommandResult;

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

Required Methods§

Source

fn commands(&self) -> &'static [&'static str]

Source

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

Source

fn run(&self, s: &Hackshell, cmd: &[&str]) -> CommandResult

Provided Methods§

Source

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

Implementors§