Command

Trait Command 

Source
pub trait Command<C, R> {
    // Required method
    fn run(self, ctx: &mut C) -> Result<R>;
}
Expand description

The trait implemented by all command types in the hierarchy.

Both dispatcher, custom commands and shell commands implement this trait, this is what allows them to be bound together. You can implement these commands manually if you need to for some reason, but the main point of the library lies with the commands! and dispatchers! macro rules, which spawn objects implementing this Command trait.

Required Methods§

Source

fn run(self, ctx: &mut C) -> Result<R>

Implementors§

Source§

impl<C, R, A> Command<C, R> for Shell<C, R, A>
where A: Parser + Command<C, R>,