Struct rargsxd::ArgParser [−][src]
Main parser struct.
Implementations
impl ArgParser
[src]
pub fn parse(&mut self) -> &mut Self
[src]
Parses std::env::args().
pub fn parse_vec(&mut self, args: Vec<String>) -> &mut Self
[src]
Parses a given Vec
pub fn get_option(&self, name: &str) -> Option<String>
[src]
Gets an option argument's output by name.
pub fn get_flag(&self, name: &str) -> Option<bool>
[src]
Gets a flag argument's output by name.
pub fn get_word(&self, name: &str) -> Option<WordType>
[src]
Gets a word argument's output by name.
pub fn new(name: &str) -> Self
[src]
Creates a new ArgParser with name
&str.
pub fn print_help(&self)
[src]
Prints the help dialog.
pub fn name(&mut self, name: &str) -> &mut Self
[src]
Sets the name of the program.
pub fn author(&mut self, author: &str) -> &mut Self
[src]
Sets the name of the author of the program.
pub fn version(&mut self, version: &str) -> &mut Self
[src]
Sets the version of the program.
pub fn copyright(&mut self, copyright: &str) -> &mut Self
[src]
Sets the copyright (if any) of the program.
pub fn info(&mut self, info: &str) -> &mut Self
[src]
Sets the info of the program.
pub fn usage(&mut self, usage: &str) -> &mut Self
[src]
Sets the usage of the program.
pub fn args(&mut self, args: Vec<&mut Arg>) -> &mut Self
[src]
Gives the parser args
Vec<&mut Arg>.
pub fn require_args(&mut self, require: bool) -> &mut Self
[src]
Sets whether or not the program should exit when no arguments are passed.
Auto Trait Implementations
impl RefUnwindSafe for ArgParser
impl Send for ArgParser
impl Sync for ArgParser
impl Unpin for ArgParser
impl UnwindSafe for ArgParser
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,