pub trait InlineMacroExprPlugin:
Debug
+ Sync
+ Send {
// Required method
fn generate_code(
&self,
db: &dyn SyntaxGroup,
item_ast: &ExprInlineMacro,
metadata: &MacroPluginMetadata<'_>,
) -> InlinePluginResult;
// Provided method
fn documentation(&self) -> Option<String> { ... }
}
Required Methods§
Sourcefn generate_code(
&self,
db: &dyn SyntaxGroup,
item_ast: &ExprInlineMacro,
metadata: &MacroPluginMetadata<'_>,
) -> InlinePluginResult
fn generate_code( &self, db: &dyn SyntaxGroup, item_ast: &ExprInlineMacro, metadata: &MacroPluginMetadata<'_>, ) -> InlinePluginResult
Generates code for an item. If no code should be generated returns None. Otherwise, returns (virtual_module_name, module_content), and a virtual submodule with that name and content should be created.
Provided Methods§
Sourcefn documentation(&self) -> Option<String>
fn documentation(&self) -> Option<String>
Allows for the plugin to provide documentation for an inline macro.