14 lines
267 B
Rust
14 lines
267 B
Rust
use clap::{ArgMatches, App};
|
|
use rust_util::XResult;
|
|
|
|
pub type CommandError = XResult<()>;
|
|
|
|
pub trait Command {
|
|
|
|
fn name(&self) -> &str;
|
|
|
|
fn subcommand<'a>(&self) -> App<'a, 'a>;
|
|
|
|
fn run(&self, arg_matches: &ArgMatches, _: &ArgMatches) -> CommandError;
|
|
}
|