Struct rargsxd::ArgParser [−][src]
Expand description
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 from_argv0() -> Self
[src]
pub fn from_argv0() -> Self
[src]Creates a new ArgParser using the first argument (the program) as the name. Creates help and version args by default
pub fn new(name: &str) -> Self
[src]
pub fn new(name: &str) -> Self
[src]Creates a new ArgParser, with
pub fn require_args(&mut self, b: bool) -> &mut Self
[src]
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]
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]
pub fn get_str(&self, name: &str) -> String
[src]Gets a String value arg by
Trait Implementations
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more