pub enum ActionToken<'a> {
Word(&'a str),
Flag(Flag),
Str(String),
Id(Option<&'a str>),
Bool(bool),
Number(usize),
Char(char),
Group(Vec<ActionToken<'a>>),
}
Variants§
Word(&'a str)
A bare word in the input.
Flag(Flag)
An action-specific flag in the input.
Str(String)
A quoted string in the input.
Id(Option<&'a str>)
An {id}
in the input that expands in the action!
macro to an identifier.
This will be None
when the input is {}
, and a positional argument will
be used from the macro arguments instead.
Bool(bool)
A boolean in the input.
Number(usize)
A number in the input.
Char(char)
A character in the input surrounded by single quotes (e.g., 'c'
).
Group(Vec<ActionToken<'a>>)
A collection of tokens between parenthesis (e.g. (foo bar 5)
).
Trait Implementations§
Source§impl<'a> Clone for ActionToken<'a>
impl<'a> Clone for ActionToken<'a>
Source§fn clone(&self) -> ActionToken<'a>
fn clone(&self) -> ActionToken<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ActionToken<'a>
impl<'a> Debug for ActionToken<'a>
Source§impl<'a> PartialEq for ActionToken<'a>
impl<'a> PartialEq for ActionToken<'a>
impl<'a> Eq for ActionToken<'a>
impl<'a> StructuralPartialEq for ActionToken<'a>
Auto Trait Implementations§
impl<'a> Freeze for ActionToken<'a>
impl<'a> RefUnwindSafe for ActionToken<'a>
impl<'a> Send for ActionToken<'a>
impl<'a> Sync for ActionToken<'a>
impl<'a> Unpin for ActionToken<'a>
impl<'a> UnwindSafe for ActionToken<'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