pub enum Arg<'a> {
Short(&'a str),
Long(&'a str),
Value(&'a OsStr),
Escape(&'a str),
Unexpected(&'a OsStr),
}
Expand description
A command line argument found by Parser
, either an option or a positional argument
Variants§
Short(&'a str)
A short option, e.g. Short("q")
for -q
Long(&'a str)
A long option, e.g. Long("verbose")
for --verbose
The dashes are not included
Value(&'a OsStr)
A positional argument, e.g. /dev/null
Escape(&'a str)
Marks the following values have been escaped with --
Unexpected(&'a OsStr)
User passed something in that doesn’t work
Trait Implementations§
impl<'a> Copy for Arg<'a>
impl<'a> Eq for Arg<'a>
impl<'a> StructuralPartialEq for Arg<'a>
Auto Trait Implementations§
impl<'a> Freeze for Arg<'a>
impl<'a> RefUnwindSafe for Arg<'a>
impl<'a> Send for Arg<'a>
impl<'a> Sync for Arg<'a>
impl<'a> Unpin for Arg<'a>
impl<'a> UnwindSafe for Arg<'a>
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