pub enum Arg<'a> {
DoubleDash,
LongOption(&'a str),
ShortOption(char),
Value(&'a str),
}Variants§
DoubleDash
Used to represent --.
After double dash all other args
will always be ArgToken::Value
LongOption(&'a str)
Long option. Only name is stored (without --)
In get --config normal -f file -vs
--config will be a long option with name config
ShortOption(char)
Short option. Only single ASCII char is stored (without -).
UTF-8 here is not supported.
In get --config normal -f file -vs
-f and -vs will be short options.
v and s are treated as written separately (as ’-v -s`)
Value(&'a str)
Value of an option or an argument.
In get --config normal -v file
normal and file will be a value
Trait Implementations§
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