Get list of custom attribute usings

There is possibility to get list of custom macro attribute usings?
I.E. I want to get all structs in project that are marked by something like #[MyAttribute] and use it in macro code.

In a macro? Fundamentally no, because macros can generate their own structs, so you can't get "all".

What you may want to do instead is change #[MyAttribute] to #[derive(MyThing)], since then you get to run your custom derive on every such type. It's still each type separately, though -- you won't get the full set.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.