pub trait CliTool<T: Serialize + Send>: Sized + Send + Parser {
    fn execute<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; fn execute_serialized<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = UserResult> + Send + 'async_trait>>
    where
        Self: 'async_trait
, { ... } fn execute_serialized_success<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = UserResult> + Send + 'async_trait>>
    where
        Self: 'async_trait
, { ... } fn execute_main<'async_trait>(
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: 'async_trait
, { ... } }
Expand description

A common trait for all CLI commands to have consistent outputs

Required Methods

Executes the command, returning a command specific type

Provided Methods

Executes the command, and serializes it to the common JSON output type

Executes the command, and throws away Ok(result) for the string Success

Executes the main function.

Implementors