#[non_exhaustive]pub enum MacroRuleNode {
Matcher,
Transcriber,
Repetition,
FragmentName,
FragmentSpecifier,
MetaVariableMatch,
RepetitionQuantifier,
RepetitionSeparator,
Terminal(Terminal),
}
Expand description
Various nodes that can be expected in a macro_rules!
invocation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Matcher
A matcher (everything that comes before the =>
of a macro rule.
Transcriber
A transcriber (everything that comes after the =>
of a macro rule.
Repetition
A repetition.
FragmentName
A fragment name.
FragmentSpecifier
A fragment type specifier (ident
, expr
, …).
MetaVariableMatch
A meta variable match, such as $a:ident
.
RepetitionQuantifier
A repetition quantifier (?
, *
, +
).
RepetitionSeparator
A repetition separator (the ,
in $( $expr ),*
).
Terminal(Terminal)
Any terminal.
Trait Implementations§
Source§impl Clone for MacroRuleNode
impl Clone for MacroRuleNode
Source§fn clone(&self) -> MacroRuleNode
fn clone(&self) -> MacroRuleNode
Returns a copy 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 Debug for MacroRuleNode
impl Debug for MacroRuleNode
Source§impl PartialEq for MacroRuleNode
impl PartialEq for MacroRuleNode
impl StructuralPartialEq for MacroRuleNode
Auto Trait Implementations§
impl Freeze for MacroRuleNode
impl RefUnwindSafe for MacroRuleNode
impl Send for MacroRuleNode
impl Sync for MacroRuleNode
impl Unpin for MacroRuleNode
impl UnwindSafe for MacroRuleNode
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