pub struct ParsedArgs { /* private fields */ }Expand description
Container for parsed command-line arguments.
Implementations§
Source§impl ParsedArgs
impl ParsedArgs
Sourcepub fn get_count(&self, name: &str) -> u32
pub fn get_count(&self, name: &str) -> u32
Get the count of times a flag was specified (for -v -v style).
Sourcepub fn get_option(&self, name: &str) -> Option<&str>
pub fn get_option(&self, name: &str) -> Option<&str>
Get the value of a single-value option.
Sourcepub fn get_multi_option(&self, name: &str) -> &[String]
pub fn get_multi_option(&self, name: &str) -> &[String]
Get all values for a multi-value option.
Sourcepub fn positional(&self) -> &[String]
pub fn positional(&self) -> &[String]
Get positional (non-flag) arguments.
Trait Implementations§
Source§impl Debug for ParsedArgs
impl Debug for ParsedArgs
Auto Trait Implementations§
impl Freeze for ParsedArgs
impl RefUnwindSafe for ParsedArgs
impl Send for ParsedArgs
impl Sync for ParsedArgs
impl Unpin for ParsedArgs
impl UnsafeUnpin for ParsedArgs
impl UnwindSafe for ParsedArgs
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