Struct args::ArgumentParser

source ·
pub struct ArgumentParser { /* private fields */ }

Implementations§

Constructor for the argument parser.

The name of the parser.

The number of arguments currently registered with the parser.

Compiles a slice of Strings into an array of Parsed Arguments. This will move the parser into this function and return back the parsed arguments if everything succeeds. This function assumes that the first item within args is the name of the executable being run. (Which is the standard for arguments passed in from std::env::args()). The ordering of the arguments returned is always the same as order they’re registered in with the parser.

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.