[−][src]Trait auto_args::AutoArgs
The primary trait, which is implemented by any type which may be part of your command-line flags.
Associated Constants
const REQUIRES_INPUT: bool
Indicates whether this type requires any input.
This is false if the data may be processed with no input, true otherwise.
Required methods
fn parse_internal(key: &str, args: &mut Vec<OsString>) -> Result<Self, Error>
For implementation, but not for using this library.
Parse this flag from the arguments, and return the set of
remaining arguments if it was successful. Otherwise return an
error message indicating what went wrong. The prefix
is
a string that should be inserted prior to a flag name.
fn tiny_help_message(key: &str) -> String
Return a tiny help message.
Provided methods
fn from_args() -> Self
Parse the command-line arguments, exiting in case of error.
This is what users actually use.
fn parse_vec(args: Vec<OsString>) -> Result<Self, Error>
Parse a Vec
of arguments as if they were command line flags
This mimics what we would do if we were doing the real parsing, except that we don't exit on error.
fn from_iter<I, T>(args: I) -> Result<Self, Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse arguments given through an iterable thing such as a Vec
or a slice, ignoring first element.
fn help_message(key: &str, doc: &str) -> String
Return a help message.
fn usage() -> String
Usage text for the actual command
fn help() -> String
Help text for the actual command