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>
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
impl<'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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more