pub enum MacroDefinition {
Text(String),
Tokens {
tokens: Vec<Token>,
num_args: usize,
},
Function(FnMacroHandler),
}Expand description
A macro definition: string template, token list, or function.
Variants§
Text(String)
Simple string expansion (e.g., \def\foo{bar} → “bar”)
Tokens
Pre-tokenized expansion with argument count
Function(FnMacroHandler)
Function-based macro (consumes tokens directly, returns expansion)
Trait Implementations§
Source§impl Clone for MacroDefinition
impl Clone for MacroDefinition
Source§fn clone(&self) -> MacroDefinition
fn clone(&self) -> MacroDefinition
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 moreAuto Trait Implementations§
impl Freeze for MacroDefinition
impl RefUnwindSafe for MacroDefinition
impl Send for MacroDefinition
impl Sync for MacroDefinition
impl Unpin for MacroDefinition
impl UnsafeUnpin for MacroDefinition
impl UnwindSafe for MacroDefinition
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