Enum argparse::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

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 Display for ArgType

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl PartialEq for ArgType

fn eq(&self, __arg_0: &ArgType) -> bool

fn ne(&self, __arg_0: &ArgType) -> bool

impl Clone for ArgType

fn clone(&self) -> ArgType

fn clone_from(&mut self, source: &Self)

impl Debug for ArgType

fn fmt(&self, __arg_0: &mut Formatter) -> Result