Crate getoptsargs

Crate getoptsargs 

Source
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 UsageError from a format string.
app
Defines the main entry point for a new app.
tokio_app
Defines the main entry point for a new async app using the tokio runtime.

Structs§

Builder
Builder for the user-defined application.
Matches
Contains the result of options and arguments parsing.