Enum argparse_rs::argparser::ArgType
[−]
[src]
pub enum ArgType { Option, Flag, List, Dict, Positional(u8), }
This enum represents the different types of arguments supported
Variants
Option
An argument that takes a value, as in ./go --pic lol.jpg
Flag
An argument that is a simple flag, as in rustc --version
List
Like an Option
, but takes multiple values, as in
./go --pics 1.png 2.png 3.png
Dict
Like a List
but takes colon-split key-value pairs, as in
./go --pics Monday:1.jpg Tuesday:2.jpg
Positional(u8)
A positional argument, as in rustc lib.rs
. The u8 indicates
The relative position of the position argument (i.e. Positional(0)
indicates that this is the first positional argument
Trait Implementations
impl Debug for ArgType
[src]
impl Clone for ArgType
[src]
fn clone(&self) -> ArgType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for ArgType
[src]
fn eq(&self, __arg_0: &ArgType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ArgType) -> bool
This method tests for !=
.