pub struct ArgumentParser { /* private fields */ }
Implementations§
Source§impl ArgumentParser
impl ArgumentParser
Sourcepub fn argument_count(&self) -> usize
pub fn argument_count(&self) -> usize
The number of arguments currently registered with the parser.
pub fn with_description(self, description: &str)
pub fn with_argument(self, argument: Argument) -> Self
Sourcepub fn compile(self, args: &[String]) -> Vec<ParsedArgument>
pub fn compile(self, args: &[String]) -> Vec<ParsedArgument>
Compiles a slice of Strings into an array of Parsed Arguments. This will move the parser into this function and return back the parsed arguments if everything succeeds. This function assumes that the first item within args is the name of the executable being run. (Which is the standard for arguments passed in from std::env::args()). The ordering of the arguments returned is always the same as order they’re registered in with the parser.
Auto Trait Implementations§
impl Freeze for ArgumentParser
impl RefUnwindSafe for ArgumentParser
impl Send for ArgumentParser
impl Sync for ArgumentParser
impl Unpin for ArgumentParser
impl UnwindSafe for ArgumentParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more