pub enum Argument {
Flag(char),
Option(char, String),
Line(i64),
Free(String),
Stdin,
}Expand description
The type of argument encountered.
Variants§
Flag(char)
Flag without a value, e.g. -h.
Option(char, String)
An option, or a flag with a value, e.g. -fbar.
Since a flag is always exactly the width of one character,
the value will be the strong that follows until a space separator is found.
For example -fbar will mean the flag is f with a value of bar.
Line(i64)
Flag indicating a line number location.
This is recognised by a + followed by a positive integer, for example +42.
Free(String)
Position argument that is not a flag or a value associated with a flag.
Stdin
Position argument indicating /dev/stdin, e.g. -.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Argument
Auto Trait Implementations§
impl Freeze for Argument
impl RefUnwindSafe for Argument
impl Send for Argument
impl Sync for Argument
impl Unpin for Argument
impl UnwindSafe for Argument
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