Struct rargsxd::ArgParser [−][src]
The main class for parsing
Fields
extra: Vec<String>
Any extra arguments that were passed, but not parsed
Implementations
impl ArgParser
[src]
impl ArgParser
[src]pub fn new(name: &str) -> Self
[src]
Creates a new ArgParser, with
pub fn author(&mut self, s: &str) -> &mut Self
[src]
Sets the author
pub fn version(&mut self, s: &str) -> &mut Self
[src]
Sets the version
pub fn copyright(&mut self, s: &str) -> &mut Self
[src]
Sets the copyright
pub fn info(&mut self, s: &str) -> &mut Self
[src]
Sets the info
pub fn usage(&mut self, s: &str) -> &mut Self
[src]
Sets the usage
pub fn require_args(&mut self, b: bool) -> &mut Self
[src]
Sets whether the program needs arguments or not
pub fn args(&mut self, args: Vec<&mut Arg>) -> &mut Self
[src]
Adds the Vec<&mut Arg> to the parser’s args
pub fn get_str(&self, name: &str) -> String
[src]
Gets a String value arg by
pub fn get_bool(&self, name: &str) -> bool
[src]
Gets a bool value arg by
pub fn parse(&mut self) -> &mut Self
[src]
Parse with env::args()
pub fn parse_vec(&mut self, args: Vec<String>) -> &mut Self
[src]
Parses a given Vec
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ArgParser
impl RefUnwindSafe for ArgParser
impl UnwindSafe for ArgParser
impl UnwindSafe for ArgParser