| 18 | /// constructed from scratch. |
| 19 | #[async_trait] |
| 20 | pub trait CommandLineHandler { |
| 21 | /// Abstraction for command line operations arguments. |
| 22 | /// |
| 23 | /// NOTE that this parameter is used to generate the command line arguments. |
| 24 | /// Currently we are directly integrating with `clap` crate. In the future we can use our own |
| 25 | /// implementation to abstract away external crates. But this should be good for now. |
| 26 | type Arguments: std::fmt::Debug + Args; |
| 27 | |
| 28 | /// Handles the request with the provided arguments. Dev should handle the content to print and how |
| 29 | async fn handle(global: &GlobalArguments, arguments: &Self::Arguments) -> anyhow::Result<()>; |
| 30 | } |
| 31 | |
| 32 | /// The global arguments that will be shared by all cli commands. |
| 33 | #[derive(Debug, Args, Clone, Default)] |
nothing calls this directly
no outgoing calls
no test coverage detected