Crate parse_argument
source ·Expand description
There are two ways to interact with Pars_argument
:
-
parse_argument
: Parse_argument will try to find a specified flag (key) and try to parse the value. can be used with any type that implementsFromStr
. -
args_to_hashmap
: Puts all args with a key/value pair into a hashmap. Key and values are both String type so you;ll have to convert it yourself.
Enums
- Errors for parse_argument(). Takes type
<<T as FromStr>::Err>
Functions
- Returns commandline arguments in a hashmap (T and E are Strings).
- Takes an argument flag, and a type (generally with turbofish syntax). Will look for any arguments in
std::env::args
that contains--{flag}=
. Then it will split it and try to parse it.