[][src]Trait clishe::Command

pub trait Command<C, R> {
    fn run(self, ctx: &mut C) -> Result<R>;
}

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

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

Loading content...

Implementors

impl<C, R, A> Command<C, R> for Shell<C, R, A> where
    A: Clap + Command<C, R>, 
[src]

Loading content...