pub struct ParsedArg<'s> { /* private fields */ }
Expand description
Command-line Argument
Implementations§
Source§impl<'s> ParsedArg<'s>
impl<'s> ParsedArg<'s>
Sourcepub fn is_negative_number(&self) -> bool
pub fn is_negative_number(&self) -> bool
Does the argument look like a negative number?
This won’t parse the number in full but attempts to see if this looks
like something along the lines of -3
, -0.3
, or -33.03
Sourcepub fn to_short(&self) -> Option<ShortFlags<'_>>
pub fn to_short(&self) -> Option<ShortFlags<'_>>
Treat as a short-flag
Sourcepub fn to_value_os(&self) -> &OsStr
pub fn to_value_os(&self) -> &OsStr
Treat as a value
NOTE: May return a flag or an escape.
Trait Implementations§
Source§impl<'s> Ord for ParsedArg<'s>
impl<'s> Ord for ParsedArg<'s>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'s> PartialOrd for ParsedArg<'s>
impl<'s> PartialOrd for ParsedArg<'s>
impl<'s> Eq for ParsedArg<'s>
impl<'s> StructuralPartialEq for ParsedArg<'s>
Auto Trait Implementations§
impl<'s> Freeze for ParsedArg<'s>
impl<'s> RefUnwindSafe for ParsedArg<'s>
impl<'s> Send for ParsedArg<'s>
impl<'s> Sync for ParsedArg<'s>
impl<'s> Unpin for ParsedArg<'s>
impl<'s> UnwindSafe for ParsedArg<'s>
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