pub struct MacroMatcher {
pub pattern: Vec<MacroVarExt>,
}Expand description
A macro pattern matcher that checks if a token sequence matches a macro pattern.
Fields§
§pattern: Vec<MacroVarExt>The pattern (list of literals and holes)
Implementations§
Source§impl MacroMatcher
impl MacroMatcher
Sourcepub fn hole_count(&self) -> usize
pub fn hole_count(&self) -> usize
Returns the number of holes.
Sourcepub fn literal_count(&self) -> usize
pub fn literal_count(&self) -> usize
Returns the number of literal tokens.
Auto Trait Implementations§
impl Freeze for MacroMatcher
impl RefUnwindSafe for MacroMatcher
impl Send for MacroMatcher
impl Sync for MacroMatcher
impl Unpin for MacroMatcher
impl UnsafeUnpin for MacroMatcher
impl UnwindSafe for MacroMatcher
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