pub enum ItemOs<'a> {
Word(OsString),
Flag(&'a str),
}Expand description
Item returned from ArgSplitter::item_os
Variants§
Word(OsString)
An argument that does not start with a dash
Flag(&'a str)
A short flag -f or a long flag --file. Includes the leading dashes.
Implementations§
Source§impl ItemOs<'_>
impl ItemOs<'_>
Sourcepub fn unexpected(&self) -> ArgError
pub fn unexpected(&self) -> ArgError
Return ArgError::UnexpectedFlag or ArgError::UnexpectedArgument
depending on the type of item.
Trait Implementations§
impl<'a> Eq for ItemOs<'a>
Source§impl<'a> ForceUnicode for ItemOs<'a>
impl<'a> ForceUnicode for ItemOs<'a>
Source§impl<'a> PartialEq for ItemOs<'a>
impl<'a> PartialEq for ItemOs<'a>
impl<'a> StructuralPartialEq for ItemOs<'a>
Auto Trait Implementations§
impl<'a> Freeze for ItemOs<'a>
impl<'a> RefUnwindSafe for ItemOs<'a>
impl<'a> Send for ItemOs<'a>
impl<'a> Sync for ItemOs<'a>
impl<'a> Unpin for ItemOs<'a>
impl<'a> UnsafeUnpin for ItemOs<'a>
impl<'a> UnwindSafe for ItemOs<'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