pub enum Arg<'a> {
Short(char),
Long(&'a str),
Value(OsString),
}
Expand description
A command line argument found by Parser
, either an option or a positional argument.
Variants§
Short(char)
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(OsString)
A positional argument, e.g. /dev/null
.
Implementations§
Trait Implementations§
source§impl<'a> PartialEq for Arg<'a>
impl<'a> PartialEq 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