The exec() function of an ExecutableCommand should get the CLI matches as well
This commit is contained in:
parent
4af971a5d0
commit
f94f8870e9
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
||||||
use std::result::Result;
|
use std::result::Result;
|
||||||
|
|
||||||
|
use clap::ArgMatches;
|
||||||
|
|
||||||
|
use runtime::Runtime;
|
||||||
use super::ModuleError;
|
use super::ModuleError;
|
||||||
use storage::backend::{StorageBackend, StorageBackendError};
|
use storage::backend::{StorageBackend, StorageBackendError};
|
||||||
|
|
||||||
|
@ -8,5 +11,8 @@ pub type CommandResult = Result<(), Result<ModuleError, CommandError>>;
|
||||||
|
|
||||||
pub trait ExecutableCommand {
|
pub trait ExecutableCommand {
|
||||||
fn get_callname() -> &'static str;
|
fn get_callname() -> &'static str;
|
||||||
fn exec(&self, rt: &Runtime, s: StorageBackend) -> CommandResult;
|
fn exec(&self,
|
||||||
|
rt: &Runtime,
|
||||||
|
matches: &ArgMatches<'a, 'a>,
|
||||||
|
s: StorageBackend) -> CommandResult;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue