Struct cleasy::App

source · []
pub struct App {
    pub name: String,
    pub version: String,
    pub author: String,
    pub args: HashMap<String, Vec<String>>,
}
Expand description

A public struct for your awesome CLI app!

Fields

name: Stringversion: Stringauthor: Stringargs: HashMap<String, Vec<String>>

Implementations

Implementing all methods for your app that give you the freedom to choose what you’d like to do.

Instantiates the “App” struct.

Checks if “-a” or “–arg” was used.

Adds an argument to the argument pool. If you’d like to accept data for an argument, set the “data” flag to either “true” or “false”.

Retrieves the command line data for an argument.

Returns a boolean to tell you whether version info was requested or not.

Returns a boolean to tell you whether help info was requested or not.

Returns a string with version info.

Helper function to split strings into vectors.

Returns a string with help info.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.