Expand description
Simple options and arguments processor that builds on getopts.
§Usage
The basic usage of getoptsargs is to define the full main method of your
application as shown in the skeleton below.
use getoptsargs::prelude::*;
fn app_setup(builder: Builder) -> Builder {
builder
}
fn app_main(_matches: Matches) -> Result<i32> {
Ok(0)
}
app!("Stylized App Name", app_setup, app_main);The app_setup function uses the builder argument to define the options and
arguments that the application exposes. The app_main function contains the
application’s main program and is executed after the command line arguments
have been processed.
Modules§
- prelude
- Public types required to implement any app. Import wholesale.
- testutils
- Helper functions to implement integration tests that use golden input and output files.
Macros§
- __
bad_ usage__ - Constructs an
UsageErrorfrom a format string. - app
- Defines the
mainentry point for a new app. - tokio_
app - Defines the
mainentry point for a new async app using the tokio runtime.