pub trait CliTask {
// Required methods
fn subcommand(&self) -> Command;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 mut self,
matches: &'life1 ArgMatches,
bootstrapper: Bootstrapper<WithConfig>,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A trait for defining a CLI command.
This is meant to be used with Cli::add_task inside
cot::project::Project::register_tasks.
Required Methods§
Sourcefn subcommand(&self) -> Command
fn subcommand(&self) -> Command
Sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 mut self,
matches: &'life1 ArgMatches,
bootstrapper: Bootstrapper<WithConfig>,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 mut self,
matches: &'life1 ArgMatches,
bootstrapper: Bootstrapper<WithConfig>,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes the task with the given matches and project.