pub enum SyntaxExtension {
Decorator(Box<ItemDecorator + 'static>),
Modifier(Box<ItemModifier + 'static>),
NormalTT(Box<TTMacroExpander + 'static>, Option<Span>),
IdentTT(Box<IdentMacroExpander + 'static>, Option<Span>),
MacroRulesTT,
}An enum representing the different kinds of syntax extensions.
Variants
Decorator | A syntax extension that is attached to an item and creates new items
based upon it.
#[derive(...)] is an ItemDecorator.
|
Modifier | A syntax extension that is attached to an item and modifies it
in-place.
|
NormalTT | A normal, function-like syntax extension.
bytes! is a NormalTT.
|
IdentTT | A function-like syntax extension that has an extra ident before
the block.
|
MacroRulesTT | Represents macro_rules! itself.
|
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:) to restrict the search to a given type.
Accepted types are: fn, mod,
struct, enum,
trait, typedef (or
tdef).