Struct cairo_lang_test_plugin::plugin::TestPlugin
source · #[non_exhaustive]pub struct TestPlugin;
Expand description
Plugin to create diagnostics for tests attributes.
Trait Implementations§
source§impl Debug for TestPlugin
impl Debug for TestPlugin
source§impl Default for TestPlugin
impl Default for TestPlugin
source§fn default() -> TestPlugin
fn default() -> TestPlugin
Returns the “default value” for a type. Read more
source§impl MacroPlugin for TestPlugin
impl MacroPlugin for TestPlugin
source§fn generate_code(
&self,
db: &dyn SyntaxGroup,
item_ast: ModuleItem,
_metadata: &MacroPluginMetadata<'_>,
) -> PluginResult
fn generate_code( &self, db: &dyn SyntaxGroup, item_ast: ModuleItem, _metadata: &MacroPluginMetadata<'_>, ) -> 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 Freeze for TestPlugin
impl RefUnwindSafe for TestPlugin
impl Send for TestPlugin
impl Sync for TestPlugin
impl Unpin for TestPlugin
impl UnwindSafe for TestPlugin
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more