pub struct ParsedArg<'s> { /* private fields */ }
Expand description
Command-line Argument
Implementations
sourceimpl<'s> ParsedArg<'s>
impl<'s> ParsedArg<'s>
sourcepub fn to_long(&self) -> Option<(Result<&str, &RawOsStr>, Option<&RawOsStr>)>
pub fn to_long(&self) -> Option<(Result<&str, &RawOsStr>, Option<&RawOsStr>)>
Treat as a long-flag
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) -> &RawOsStr
pub fn to_value_os(&self) -> &RawOsStr
Treat as a value
NOTE: May return a flag or an escape.
Trait Implementations
sourceimpl<'s> Ord for ParsedArg<'s>
impl<'s> Ord for ParsedArg<'s>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<'s> PartialEq<ParsedArg<'s>> for ParsedArg<'s>
impl<'s> PartialEq<ParsedArg<'s>> for ParsedArg<'s>
sourceimpl<'s> PartialOrd<ParsedArg<'s>> for ParsedArg<'s>
impl<'s> PartialOrd<ParsedArg<'s>> for ParsedArg<'s>
sourcefn partial_cmp(&self, other: &ParsedArg<'s>) -> Option<Ordering>
fn partial_cmp(&self, other: &ParsedArg<'s>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'s> Eq for ParsedArg<'s>
impl<'s> StructuralEq for ParsedArg<'s>
impl<'s> StructuralPartialEq for ParsedArg<'s>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more