Enum palex::TokenKind [−][src]
The kind of the current token.
This enum acts as the state of the currently parsed argument; this is necessary because an argument can consist of multiple tokens.
Variants
An argument that doesn't start with dashes, e.g. program
.
An argument that starts with exactly 1 dash, e.g. -foo
, -V
,
-h=config
.
An argument that starts with 2 or more dashes, e.g. --version
or
--help=config
.
An option or value of a single-dash argument, after an option has been eaten.
Example when parsing -abcd=efg,hij
abcd=efg # OneDash
bcd=efg # AfterOneDash
cd=efg # AfterOneDash
efg # AfterEquals
A value of an argument after the =
, after the name of the argument has
been eaten.
Example when parsing --abcd=efg,hij
abcd=efg,hij # TwoDashes
efg,hij # AfterEquals
hij # AfterEquals
Trait Implementations
impl Clone for TokenKind
[src]
impl Copy for TokenKind
[src]
impl Debug for TokenKind
[src]
impl Eq for TokenKind
[src]
impl PartialEq<TokenKind> for TokenKind
[src]
fn eq(&self, other: &TokenKind) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for TokenKind
[src]
impl StructuralPartialEq for TokenKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for TokenKind
[src]
impl Send for TokenKind
[src]
impl Sync for TokenKind
[src]
impl Unpin for TokenKind
[src]
impl UnwindSafe for TokenKind
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,