Struct cairo_lang_plugins::plugins::GenerateTraitPlugin
source · #[non_exhaustive]pub struct GenerateTraitPlugin;
Trait Implementations§
source§impl Debug for GenerateTraitPlugin
impl Debug for GenerateTraitPlugin
source§impl Default for GenerateTraitPlugin
impl Default for GenerateTraitPlugin
source§fn default() -> GenerateTraitPlugin
fn default() -> GenerateTraitPlugin
Returns the “default value” for a type. Read more
source§impl MacroPlugin for GenerateTraitPlugin
impl MacroPlugin for GenerateTraitPlugin
source§fn generate_code(
&self,
db: &dyn SyntaxGroup,
item_ast: ModuleItem
) -> PluginResult
fn generate_code( &self, db: &dyn SyntaxGroup, item_ast: ModuleItem ) -> PluginResult
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.
source§fn declared_attributes(&self) -> Vec<String>
fn declared_attributes(&self) -> Vec<String>
Attributes this plugin uses.
Attributes the plugin uses without declaring here are likely to cause a compilation error
for unknown attribute.
Note: They may not cause a diagnostic if some other plugin declares such attribute, but
plugin writers should not rely on that.
Auto Trait Implementations§
impl RefUnwindSafe for GenerateTraitPlugin
impl Send for GenerateTraitPlugin
impl Sync for GenerateTraitPlugin
impl Unpin for GenerateTraitPlugin
impl UnwindSafe for GenerateTraitPlugin
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