Command

Trait Command 

Source
pub trait Command<A: Args, C: Context> {
    // Required method
    fn run(self, args: A, context: C) -> Result<()>;
}
Expand description

A command that can be run.

Required Methods§

Source

fn run(self, args: A, context: C) -> Result<()>

Run the command, given arguments and a context.

Implementors§

Source§

impl<F, A: Args, C: Context> Command<A, C> for F
where F: FnOnce(A, C) -> Result<()>,