hermes_cli_components/traits/command.rs
1use cgp::prelude::*;
2
3use crate::traits::output::HasOutputType;
4
5#[derive_component(CommandRunnerComponent, CommandRunner<App>)]
6#[async_trait]
7pub trait CanRunCommand<Args>: HasOutputType + HasErrorType
8where
9 Args: Async,
10{
11 async fn run_command(&self, args: &Args) -> Result<Self::Output, Self::Error>;
12}